From 9793855caf01d4ce9740dd99971e771cca6715a6 Mon Sep 17 00:00:00 2001 From: James Moger Date: Fri, 13 Jun 2014 08:22:27 -0400 Subject: [PATCH] Fix NPE in GitblitClient --- releases.moxie | 1 + src/main/java/com/gitblit/client/GitblitClient.java | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/releases.moxie b/releases.moxie index c473d4fc..7314160d 100644 --- a/releases.moxie +++ b/releases.moxie @@ -38,6 +38,7 @@ r24: { - Fixed Ticket responsible selections not considering the AUTHENTICATED authorization control (ticket-91) - Fixed invalid generated SSH url for port 22 (issue-444, ticket-98) - Fix cloning repositories with `+` in their names. (revert pr-136, issue-362, ticket-100) + - Fixed NPE in GitblitClient (ticket-102) changes: - Split the pages servlet into a raw servlet and a pages servlet. All raw links now use the raw servlet (issue-413, ticket-49) - Drop deprecated --set-upstream syntax for -u (ticket-59) diff --git a/src/main/java/com/gitblit/client/GitblitClient.java b/src/main/java/com/gitblit/client/GitblitClient.java index 66625a8e..f5bba1ad 100644 --- a/src/main/java/com/gitblit/client/GitblitClient.java +++ b/src/main/java/com/gitblit/client/GitblitClient.java @@ -253,9 +253,11 @@ public class GitblitClient implements Serializable { // create list of available scripts by excluding inherited scripts List scripts = new ArrayList(); - for (String script : settings.pushScripts) { - if (!inherited.contains(script)) { - scripts.add(script); + if (!ArrayUtils.isEmpty(settings.pushScripts)) { + for (String script : settings.pushScripts) { + if (!inherited.contains(script)) { + scripts.add(script); + } } } return scripts; -- 2.39.5