From: David ‘Bombe’ Roden Date: Fri, 19 Sep 2014 20:35:37 +0000 (+0200) Subject: Fix parsing of latest edition when it’s not present. X-Git-Tag: 0.9-rc1^2~3^2~110 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=59ded3762bb6b7e62d7e51ed95ac3b810981e4c3;p=Sone.git Fix parsing of latest edition when it’s not present. --- diff --git a/src/main/java/net/pterodactylus/sone/core/Core.java b/src/main/java/net/pterodactylus/sone/core/Core.java index 5fa330b..5867415 100644 --- a/src/main/java/net/pterodactylus/sone/core/Core.java +++ b/src/main/java/net/pterodactylus/sone/core/Core.java @@ -768,8 +768,8 @@ public class Core extends AbstractService implements SoneProvider, PostProvider, logger.log(Level.WARNING, "Given Identity is null!"); return null; } - final Long latestEdition = fromNullable(tryParse( - identity.getProperty("Sone.LatestEdition"))).or(0L); + final Long latestEdition = tryParse(fromNullable( + identity.getProperty("Sone.LatestEdition")).or("0")); synchronized (sones) { final Sone sone = getRemoteSone(identity.getId(), true); if (sone.isLocal()) {