From a14d689586638b7a2f9348c2be1cbcf8cc6da55f Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 27 Feb 2016 11:01:31 +0100 Subject: [PATCH] Initialize latest edition of update checker correctly Thanks to TheSeeker for finding and reporting this one. --- src/main/java/net/pterodactylus/sone/core/UpdateChecker.java | 2 +- src/main/java/net/pterodactylus/sone/main/SonePlugin.java | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/pterodactylus/sone/core/UpdateChecker.java b/src/main/java/net/pterodactylus/sone/core/UpdateChecker.java index 2fba40b..06309c7 100644 --- a/src/main/java/net/pterodactylus/sone/core/UpdateChecker.java +++ b/src/main/java/net/pterodactylus/sone/core/UpdateChecker.java @@ -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; diff --git a/src/main/java/net/pterodactylus/sone/main/SonePlugin.java b/src/main/java/net/pterodactylus/sone/main/SonePlugin.java index 53a942d..604be75 100644 --- a/src/main/java/net/pterodactylus/sone/main/SonePlugin.java +++ b/src/main/java/net/pterodactylus/sone/main/SonePlugin.java @@ -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 // -- 2.7.4