]> git.mxchange.org Git - jcore.git/commitdiff
Possible fix for non-working path detection on Linux?
authorRoland Haeder <roland@mxchange.org>
Wed, 12 Aug 2015 15:33:21 +0000 (17:33 +0200)
committerRoland Haeder <roland@mxchange.org>
Wed, 12 Aug 2015 15:33:21 +0000 (17:33 +0200)
Signed-off-by:Roland Häder <roland@mxchange.org>

src/org/mxchange/jcore/BaseFrameworkSystem.java

index 6d7ca8a5f1d848cbe75a81be47017f06b65d5cb4..a1c808e0301f462b27ee834ab923ca089393ad05 100644 (file)
@@ -353,7 +353,7 @@ public class BaseFrameworkSystem implements FrameworkInterface {
                // Init default values:
                // Default database backend
                BaseFrameworkSystem.properties.put("org.mxchange.database.backend.class", "org.mxchange.jcore.database.backend.base64.Base64CsvDatabaseBackend"); //NOI18N
-               BaseFrameworkSystem.properties.put("database.backend.storagepath", "data"); //NOI18N
+               BaseFrameworkSystem.properties.put("database.backend.storagepath", "data/"); //NOI18N
 
                // For MySQL backend
                BaseFrameworkSystem.properties.put("org.mxchange.database.mysql.host", "localhost"); //NOI18N
@@ -836,6 +836,15 @@ public class BaseFrameworkSystem implements FrameworkInterface {
                // Trace message
                this.getLogger().trace(MessageFormat.format("key={0},value={1} - CALLED!", key, value)); //NOI18N
 
+               // Both should not be null
+               if (key == null) {
+                       // key is null
+                       throw new NullPointerException("key is null");
+               } else if (value == null) {
+                       // value is null
+                       throw new NullPointerException("value is null");
+               }
+
                // Set it
                properties.setProperty(String.format("org.mxchange.%s", key), value); //NOI18N