@Produces(MediaType.APPLICATION_JSON)
<BUG>public Response getAllCounters(@PathParam("project_id") Long projectId) {
</BUG>
User user = ((UserPrincipal) securityContext.getUserPrincipal()).getUser();
LOGGER.traceEntry("getAllCounters({}) for user {}.", projectId, user);
<BUG>try {</BUG>
List<Counter> counters = counterDAO.getAll(user.getId(), projectId);
LOGGER.traceExit(counters);
return ResponseHelper.renderList(counters, Response.Status.OK);
<BUG>} catch (NotFoundException e) {
LOGGER.traceExit(e);
return ResourceErrorHandler.createRESTErrorMessage("CounterResource.getAll", Response.Status.NOT_FOUND, e);
}</BUG>
}

@Produces(MediaType.APPLICATION_JSON)
public Response getAllCounters(@PathParam("project_id") Long projectId) throws NotFoundException {
User user = ((UserPrincipal) securityContext.getUserPrincipal()).getUser();
LOGGER.traceEntry("getAllCounters({}) for user {}.", projectId, user);
List<Counter> counters = counterDAO.getAll(user.getId(), projectId);
LOGGER.traceExit(counters);
return ResponseHelper.renderList(counters, Response.Status.OK);
}
