diff options
author | James Moger <james.moger@gitblit.com> | 2014-06-13 08:22:27 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2014-06-13 08:22:27 -0400 |
commit | 9793855caf01d4ce9740dd99971e771cca6715a6 (patch) | |
tree | 1a1891a83d971ebb9941d19602834d9dd296d402 /src | |
parent | 845271c3c738f1b3b2aab5d3ad4c657adda3b960 (diff) | |
download | gitblit-9793855caf01d4ce9740dd99971e771cca6715a6.tar.gz gitblit-9793855caf01d4ce9740dd99971e771cca6715a6.zip |
Fix NPE in GitblitClient
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/gitblit/client/GitblitClient.java | 8 |
1 files changed, 5 insertions, 3 deletions
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<String> scripts = new ArrayList<String>();
- 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;
|