Initialize options of Sone before aborting loading an empty Sone.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 3 May 2011 17:43:05 +0000 (19:43 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 3 May 2011 17:43:05 +0000 (19:43 +0200)
src/main/java/net/pterodactylus/sone/core/Core.java

index 55e3b65..53b6700 100644 (file)
@@ -1173,6 +1173,9 @@ public class Core implements IdentityListener, UpdateListener {
                        return;
                }
 
+               /* initialize options. */
+               sone.getOptions().addBooleanOption("AutoFollow", new DefaultOption<Boolean>(false));
+
                /* load Sone. */
                String sonePrefix = "Sone/" + sone.getId();
                Long soneTime = configuration.getLongValue(sonePrefix + "/Time").getValue(null);
@@ -1273,7 +1276,6 @@ public class Core implements IdentityListener, UpdateListener {
                }
 
                /* load options. */
-               sone.getOptions().addBooleanOption("AutoFollow", new DefaultOption<Boolean>(false));
                sone.getOptions().getBooleanOption("AutoFollow").set(configuration.getBooleanValue(sonePrefix + "/Options/AutoFollow").getValue(null));
 
                /* if we’re still here, Sone was loaded successfully. */