]> source.dussan.org Git - gitblit.git/commitdiff
fix: Fix null pointer exception in FileSettings 1433/head
authorFlorian Zschocke <f.zschocke+git@gmail.com>
Mon, 31 Oct 2022 21:38:06 +0000 (22:38 +0100)
committerFlorian Zschocke <f.zschocke+git@gmail.com>
Mon, 31 Oct 2022 21:38:06 +0000 (22:38 +0100)
Fix a null pointer access in the `toString` method for a freshly created
`FileSettings`.

src/main/java/com/gitblit/FileSettings.java

index 3caf966bf4400dedc6a7c2c0271a7648daa34b43..24d86d30724a3d6aa5c63450d5a4f7e0232bb26c 100644 (file)
@@ -227,6 +227,9 @@ public class FileSettings extends IStoredSettings {
 \r
        @Override\r
        public String toString() {\r
+               if (propertiesFile == null) {\r
+                       return "[empty]";\r
+               }\r
                return propertiesFile.getAbsolutePath();\r
        }\r
 }\r