summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Zschocke <f.zschocke+git@gmail.com>2022-10-31 22:38:06 +0100
committerFlorian Zschocke <f.zschocke+git@gmail.com>2022-10-31 22:38:06 +0100
commit6deb2058486e26619120132d4658473f71da3f68 (patch)
tree66f7125aac52996815b5bbd5f827529611d45f5f
parentbc3944d11c600458820c1abc37a66fb7dfa56cc8 (diff)
downloadgitblit-6deb2058486e26619120132d4658473f71da3f68.tar.gz
gitblit-6deb2058486e26619120132d4658473f71da3f68.zip
fix: Fix null pointer exception in FileSettings
Fix a null pointer access in the `toString` method for a freshly created `FileSettings`.
-rw-r--r--src/main/java/com/gitblit/FileSettings.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/com/gitblit/FileSettings.java b/src/main/java/com/gitblit/FileSettings.java
index 3caf966b..24d86d30 100644
--- a/src/main/java/com/gitblit/FileSettings.java
+++ b/src/main/java/com/gitblit/FileSettings.java
@@ -227,6 +227,9 @@ public class FileSettings extends IStoredSettings {
@Override
public String toString() {
+ if (propertiesFile == null) {
+ return "[empty]";
+ }
return propertiesFile.getAbsolutePath();
}
}