]> source.dussan.org Git - gitblit.git/commitdiff
Catch a few other possible error scenarios in Redmine user service
authorJames Moger <james.moger@gitblit.com>
Tue, 8 Jan 2013 20:19:53 +0000 (15:19 -0500)
committerJames Moger <james.moger@gitblit.com>
Tue, 8 Jan 2013 20:19:53 +0000 (15:19 -0500)
src/com/gitblit/RedmineUserService.java

index 504593fba61a170667e9b2fc2678ef1cf35d179d..84194d5b37f9820e1374ba9acc4f251dc42961b4 100644 (file)
@@ -102,6 +102,11 @@ public class RedmineUserService extends GitblitUserService {
                }\r
         }\r
         \r
+        if (StringUtils.isEmpty(jsonString)) {\r
+               logger.error("Received empty authentication response from Redmine");\r
+               return null;\r
+        }\r
+        \r
         RedmineCurrent current = null;\r
         try {\r
                current = new Gson().fromJson(jsonString, RedmineCurrent.class);\r