Paul Martin
2016-04-30 a502d96a860456ec5e8c96761db70f7cabb74751
src/main/java/com/gitblit/servlet/SyndicationServlet.java
@@ -22,8 +22,6 @@
import java.util.List;
import java.util.Map;
import javax.inject.Inject;
import javax.inject.Singleton;
import javax.servlet.http.HttpServlet;
import org.eclipse.jgit.lib.ObjectId;
@@ -48,6 +46,8 @@
import com.gitblit.utils.JGitUtils;
import com.gitblit.utils.StringUtils;
import com.gitblit.utils.SyndicationUtils;
import com.google.inject.Inject;
import com.google.inject.Singleton;
/**
 * SyndicationServlet generates RSS 2.0 feeds and feed links.
@@ -154,7 +154,7 @@
      String servletUrl = request.getContextPath() + request.getServletPath();
      String url = request.getRequestURI().substring(servletUrl.length());
      if (url.charAt(0) == '/' && url.length() > 1) {
      if (url.length() > 1 && url.charAt(0) == '/') {
         url = url.substring(1);
      }
      String repositoryName = url;
@@ -199,7 +199,7 @@
      response.setContentType("application/rss+xml; charset=UTF-8");
      boolean isProjectFeed = false;
      String feedName = null;
      String feedName = "Gitblit";
      String feedTitle = null;
      String feedDescription = null;
@@ -243,7 +243,7 @@
         RepositoryModel model = repositoryManager.getRepositoryModel(name);
         if (repository == null) {
            if (model.isCollectingGarbage) {
            if (model != null && model.isCollectingGarbage) {
               logger.warn(MessageFormat.format("Temporarily excluding {0} from feed, busy collecting garbage", name));
            }
            continue;
@@ -368,7 +368,7 @@
         if (mountParameters) {
            // mounted url
            feedLink = MessageFormat.format("{0}/summary/{1}", gitblitUrl,
                  StringUtils.encodeURL(feedName));
                  StringUtils.encodeURL(feedName.replace('/', fsc)));
         } else {
            // parameterized url
            feedLink = MessageFormat.format("{0}/summary/?r={1}", gitblitUrl,