Set the latest edition in a better way on a Sone being parsed.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 24 Jan 2011 19:20:58 +0000 (20:20 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 24 Jan 2011 19:20:58 +0000 (20:20 +0100)
src/main/java/net/pterodactylus/sone/core/SoneDownloader.java

index af4155d..c883301 100644 (file)
@@ -285,7 +285,7 @@ public class SoneDownloader extends AbstractService {
                if ((soneInsertUri != null) && (sone.getInsertUri() == null)) {
                        try {
                                sone.setInsertUri(new FreenetURI(soneInsertUri));
-                               sone.setLatestEdition(Math.max(sone.getRequestUri().getSuggestedEdition(), sone.getInsertUri().getSuggestedEdition()));
+                               sone.setLatestEdition(Math.max(sone.getRequestUri().getEdition(), sone.getInsertUri().getEdition()));
                        } catch (MalformedURLException mue1) {
                                /* TODO - mark Sone as bad. */
                                logger.log(Level.WARNING, "Downloaded Sone " + sone + " has invalid insert URI: " + soneInsertUri, mue1);