From: Roland Haeder Date: Wed, 12 Aug 2015 15:33:21 +0000 (+0200) Subject: Possible fix for non-working path detection on Linux? X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=96ac10f09a63afdd23ac43e5b3df51486caafe8b;p=jcore.git Possible fix for non-working path detection on Linux? Signed-off-by:Roland Häder --- diff --git a/src/org/mxchange/jcore/BaseFrameworkSystem.java b/src/org/mxchange/jcore/BaseFrameworkSystem.java index 6d7ca8a..a1c808e 100644 --- a/src/org/mxchange/jcore/BaseFrameworkSystem.java +++ b/src/org/mxchange/jcore/BaseFrameworkSystem.java @@ -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