From 699e71e76b15081baf746c6ce9c9144f7e5f1ff9 Mon Sep 17 00:00:00 2001 From: James Moger <james.moger@gitblit.com> Date: Mon, 30 Sep 2013 10:11:28 -0400 Subject: [PATCH] Trim trailing whitespace and organize imports --- src/main/java/com/gitblit/SyndicationServlet.java | 32 ++++++++++++++++---------------- 1 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/main/java/com/gitblit/SyndicationServlet.java b/src/main/java/com/gitblit/SyndicationServlet.java index bdb3b57..6b3c01c 100644 --- a/src/main/java/com/gitblit/SyndicationServlet.java +++ b/src/main/java/com/gitblit/SyndicationServlet.java @@ -43,11 +43,11 @@ /** * 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 @@ /** * Create a feed link for the specified repository and branch/tag/commit id. - * + * * @param baseURL * @param repository * the repository name @@ -95,7 +95,7 @@ /** * Determines the appropriate title for a feed. - * + * * @param repository * @param objectId * @return title of the feed @@ -116,7 +116,7 @@ /** * Generates the feed content. - * + * * @param request * @param response * @throws javax.servlet.ServletException @@ -162,12 +162,12 @@ } response.setContentType("application/rss+xml; charset=UTF-8"); - + boolean isProjectFeed = false; String feedName = null; String feedTitle = null; String feedDescription = null; - + List<String> repositories = null; if (repositoryName.indexOf('/') == -1 && !repositoryName.toLowerCase().endsWith(".git")) { // try to find a project @@ -179,14 +179,14 @@ if (project != null) { isProjectFeed = true; repositories = new ArrayList<String>(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 @@ 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 @@ feedTitle = model.name; feedDescription = model.description; } - + List<RevCommit> commits; if (StringUtils.isEmpty(searchString)) { // standard log/history lookup @@ -248,7 +248,7 @@ commit.getFullMessage()); entry.content = message; entry.repository = model.name; - entry.branch = objectId; + entry.branch = objectId; entry.tags = new ArrayList<String>(); // add commit id and parent commit ids @@ -263,18 +263,18 @@ 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 -- Gitblit v1.9.1