Don’t try to parse null values.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 13 Oct 2010 04:28:07 +0000 (06:28 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 13 Oct 2010 04:28:07 +0000 (06:28 +0200)
src/main/java/net/pterodactylus/sone/core/Core.java

index f56c1ce..8563187 100644 (file)
@@ -114,7 +114,10 @@ public class Core extends AbstractService {
                logger.entering(Core.class.getName(), "loadConfiguration()");
 
                /* get names of all local Sones. */
-               String allSoneNamesString = configuration.getStringValue("Sone/Names").getValue("");
+               String allSoneNamesString = configuration.getStringValue("Sone/Names").getValue(null);
+               if (allSoneNamesString == null) {
+                       allSoneNamesString = "";
+               }
                List<String> allSoneNames;
                try {
                        allSoneNames = StringEscaper.parseLine(allSoneNamesString);