From 699e71e76b15081baf746c6ce9c9144f7e5f1ff9 Mon Sep 17 00:00:00 2001 From: James Moger Date: Mon, 30 Sep 2013 09:30:04 -0400 Subject: Trim trailing whitespace and organize imports Change-Id: I9f91138b20219be6e3c4b28251487df262bff6cc --- src/main/java/com/gitblit/SyndicationServlet.java | 32 +++++++++++------------ 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'src/main/java/com/gitblit/SyndicationServlet.java') diff --git a/src/main/java/com/gitblit/SyndicationServlet.java b/src/main/java/com/gitblit/SyndicationServlet.java index bdb3b571..6b3c01ca 100644 --- a/src/main/java/com/gitblit/SyndicationServlet.java +++ b/src/main/java/com/gitblit/SyndicationServlet.java @@ -43,11 +43,11 @@ import com.gitblit.utils.SyndicationUtils; /** * SyndicationServlet generates RSS 2.0 feeds and feed links. - * + * * Access to this servlet is protected by the SyndicationFilter. - * + * * @author James Moger - * + * */ public class SyndicationServlet extends HttpServlet { @@ -57,7 +57,7 @@ public class SyndicationServlet extends HttpServlet { /** * Create a feed link for the specified repository and branch/tag/commit id. - * + * * @param baseURL * @param repository * the repository name @@ -95,7 +95,7 @@ public class SyndicationServlet extends HttpServlet { /** * Determines the appropriate title for a feed. - * + * * @param repository * @param objectId * @return title of the feed @@ -116,7 +116,7 @@ public class SyndicationServlet extends HttpServlet { /** * Generates the feed content. - * + * * @param request * @param response * @throws javax.servlet.ServletException @@ -162,12 +162,12 @@ public class SyndicationServlet extends HttpServlet { } response.setContentType("application/rss+xml; charset=UTF-8"); - + boolean isProjectFeed = false; String feedName = null; String feedTitle = null; String feedDescription = null; - + List repositories = null; if (repositoryName.indexOf('/') == -1 && !repositoryName.toLowerCase().endsWith(".git")) { // try to find a project @@ -179,14 +179,14 @@ public class SyndicationServlet extends HttpServlet { if (project != null) { isProjectFeed = true; repositories = new ArrayList(project.repositories); - + // project feed feedName = project.name; feedTitle = project.title; feedDescription = project.description; } } - + if (repositories == null) { // could not find project, assume this is a repository repositories = Arrays.asList(repositoryName); @@ -214,7 +214,7 @@ public class SyndicationServlet extends HttpServlet { if (repository == null) { if (model.isCollectingGarbage) { logger.warn(MessageFormat.format("Temporarily excluding {0} from feed, busy collecting garbage", name)); - } + } continue; } if (!isProjectFeed) { @@ -223,7 +223,7 @@ public class SyndicationServlet extends HttpServlet { feedTitle = model.name; feedDescription = model.description; } - + List commits; if (StringUtils.isEmpty(searchString)) { // standard log/history lookup @@ -248,7 +248,7 @@ public class SyndicationServlet extends HttpServlet { commit.getFullMessage()); entry.content = message; entry.repository = model.name; - entry.branch = objectId; + entry.branch = objectId; entry.tags = new ArrayList(); // add commit id and parent commit ids @@ -263,18 +263,18 @@ public class SyndicationServlet extends HttpServlet { for (RefModel ref : refs) { entry.tags.add("ref:" + ref.getName()); } - } + } entries.add(entry); } } - + // sort & truncate the feed Collections.sort(entries); if (entries.size() > length) { // clip the list entries = entries.subList(0, length); } - + String feedLink; if (isProjectFeed) { // project feed -- cgit v1.2.3