From bae006a9f7f43f3d49644307ce1ef5ef4f51e221 Mon Sep 17 00:00:00 2001 From: Sebastian Sdorra Date: Mon, 14 Nov 2011 09:43:42 +0100 Subject: [PATCH] added javadoc --- .../scm/api/rest/resources/RepositoryResource.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/scm-webapp/src/main/java/sonia/scm/api/rest/resources/RepositoryResource.java b/scm-webapp/src/main/java/sonia/scm/api/rest/resources/RepositoryResource.java index 247d739742..6cfc28ea51 100644 --- a/scm-webapp/src/main/java/sonia/scm/api/rest/resources/RepositoryResource.java +++ b/scm-webapp/src/main/java/sonia/scm/api/rest/resources/RepositoryResource.java @@ -67,6 +67,7 @@ import sonia.scm.repository.RepositoryNotFoundException; import sonia.scm.util.AssertUtil; import sonia.scm.util.HttpUtil; import sonia.scm.util.SecurityUtil; +import sonia.scm.util.Util; import sonia.scm.web.security.WebSecurityContext; //~--- JDK imports ------------------------------------------------------------ @@ -422,7 +423,7 @@ public class RepositoryResource * * * @param id the id of the repository - * @param path + * @param path path of a file * @param start the start value for paging * @param limit the limit value for paging * @@ -435,8 +436,9 @@ public class RepositoryResource @Path("{id}/changesets") @TypeHint(ChangesetPagingResult.class) @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) - public Response getChangesets(@PathParam("id") String id, @DefaultValue("") - @QueryParam("path") String path, @DefaultValue("0") + public Response getChangesets(@PathParam("id") String id, + @QueryParam("path") String path, + @DefaultValue("0") @QueryParam("start") int start, @DefaultValue("20") @QueryParam("limit") int limit) throws RepositoryException, IOException { @@ -444,9 +446,9 @@ public class RepositoryResource try { - ChangesetPagingResult changesets; + ChangesetPagingResult changesets = null; - if ("".equals(path)) + if (Util.isNotEmpty(path)) { changesets = changesetViewerUtil.getChangesets(id, start, limit); }