From 96ac10f09a63afdd23ac43e5b3df51486caafe8b Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Wed, 12 Aug 2015 17:33:21 +0200 Subject: [PATCH] =?utf8?q?Possible=20fix=20for=20non-working=20path=20dete?= =?utf8?q?ction=20on=20Linux=3F=20Signed-off-by:Roland=20H=C3=A4der=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/org/mxchange/jcore/BaseFrameworkSystem.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 -- 2.39.5