From a413ed7c41880cec3c224501dd2ed874fdbeef17 Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Sun, 22 Nov 2015 14:53:36 -0500
Subject: [PATCH] Reset build identifiers for next point release cycle
---
src/main/java/com/gitblit/servlet/SyndicationServlet.java | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/main/java/com/gitblit/servlet/SyndicationServlet.java b/src/main/java/com/gitblit/servlet/SyndicationServlet.java
index c48f25f..39dbf2e 100644
--- a/src/main/java/com/gitblit/servlet/SyndicationServlet.java
+++ b/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,
--
Gitblit v1.9.1