From 1aec17636d8c548257cb307f8cc1e41354e00421 Mon Sep 17 00:00:00 2001
From: marco <mw.sunshine@gmx.de>
Date: Mon, 23 Nov 2015 13:58:14 -0500
Subject: [PATCH] Fix 2 possible NullPointer occurences
---
src/main/java/com/gitblit/utils/SyndicationUtils.java | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/src/main/java/com/gitblit/utils/SyndicationUtils.java b/src/main/java/com/gitblit/utils/SyndicationUtils.java
index 93e9321..7afd038 100644
--- a/src/main/java/com/gitblit/utils/SyndicationUtils.java
+++ b/src/main/java/com/gitblit/utils/SyndicationUtils.java
@@ -71,7 +71,11 @@
feed.setEncoding("UTF-8");
feed.setTitle(title);
feed.setLink(feedLink);
- feed.setDescription(description);
+ if (StringUtils.isEmpty(description)) {
+ feed.setDescription(title);
+ } else {
+ feed.setDescription(description);
+ }
SyndImageImpl image = new SyndImageImpl();
image.setTitle(Constants.NAME);
image.setUrl(hostUrl + "/gitblt_25.png");
--
Gitblit v1.9.1