Store insert key of blacklisted Sone correctly.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 27 Oct 2010 16:49:30 +0000 (18:49 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 27 Oct 2010 16:49:30 +0000 (18:49 +0200)
src/main/java/net/pterodactylus/sone/core/Core.java

index c3bacac..b6dfdf3 100644 (file)
@@ -999,7 +999,7 @@ public class Core extends AbstractService {
                                configuration.getStringValue(blacklistedSonePrefix + "/ID").setValue(blacklistedSone.getId());
                                configuration.getStringValue(blacklistedSonePrefix + "/Name").setValue(blacklistedSone.getName());
                                configuration.getStringValue(blacklistedSonePrefix + "/Key").setValue(blacklistedSone.getRequestUri().toString());
-                               configuration.getStringValue(blacklistedSonePrefix + "/InsertKey").setValue(blacklistedSone.getInsertUri().toString());
+                               configuration.getStringValue(blacklistedSonePrefix + "/InsertKey").setValue((blacklistedSone.getInsertUri() != null) ? blacklistedSone.getInsertUri().toString() : null);
                                /* TODO - store all known stuff? */
                        }
                        configuration.getStringValue("BlacklistedSone." + blacklistedSonesCounter + "/ID").setValue(null);