Initialize latest edition of update checker correctly
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 27 Feb 2016 10:01:31 +0000 (11:01 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 27 Feb 2016 10:01:31 +0000 (11:01 +0100)
Thanks to TheSeeker for finding and reporting this one.

src/main/java/net/pterodactylus/sone/core/UpdateChecker.java
src/main/java/net/pterodactylus/sone/main/SonePlugin.java

index 2fba40b..06309c7 100644 (file)
@@ -63,7 +63,7 @@ public class UpdateChecker {
        private FreenetURI currentUri;
 
        /** The latest known edition. */
-       private long latestEdition;
+       private long latestEdition = SonePlugin.getLatestEdition();
 
        /** The current latest known version. */
        private Version currentLatestVersion;
index 53a942d..604be75 100644 (file)
@@ -183,6 +183,10 @@ public class SonePlugin implements FredPlugin, FredPluginFCP, FredPluginL10n, Fr
                return SONE_HOMEPAGE + LATEST_EDITION;
        }
 
+       public static long getLatestEdition() {
+               return LATEST_EDITION;
+       }
+
        //
        // FREDPLUGIN METHODS
        //