Set latest edition outside the try-catch block.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 14 Nov 2010 10:32:38 +0000 (11:32 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 14 Nov 2010 10:32:38 +0000 (11:32 +0100)
src/main/java/net/pterodactylus/sone/core/Core.java

index 393c91f..86940c3 100644 (file)
@@ -592,11 +592,11 @@ public class Core implements IdentityListener {
                        final Sone sone;
                        try {
                                sone = getLocalSone(ownIdentity.getId()).setIdentity(ownIdentity).setInsertUri(new FreenetURI(ownIdentity.getInsertUri())).setRequestUri(new FreenetURI(ownIdentity.getRequestUri()));
-                               sone.setLatestEdition(Numbers.safeParseLong(ownIdentity.getProperty("Sone.LatestEdition"), (long) 0));
                        } catch (MalformedURLException mue1) {
                                logger.log(Level.SEVERE, "Could not convert the Identity’s URIs to Freenet URIs: " + ownIdentity.getInsertUri() + ", " + ownIdentity.getRequestUri(), mue1);
                                return null;
                        }
+                       sone.setLatestEdition(Numbers.safeParseLong(ownIdentity.getProperty("Sone.LatestEdition"), (long) 0));
                        /* TODO - load posts ’n stuff */
                        localSones.put(ownIdentity.getId(), sone);
                        SoneInserter soneInserter = new SoneInserter(this, freenetInterface, sone);