From: David ‘Bombe’ Roden Date: Sat, 26 Jan 2013 10:03:40 +0000 (+0100) Subject: Return the real time a Sone was followed. X-Git-Tag: 0.8.5^2~3^2~47 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=ac3e2838d8b99eb66c26030afe50731f536bd17b Return the real time a Sone was followed. --- diff --git a/src/main/java/net/pterodactylus/sone/core/Core.java b/src/main/java/net/pterodactylus/sone/core/Core.java index 15ce975..e46eceb 100644 --- a/src/main/java/net/pterodactylus/sone/core/Core.java +++ b/src/main/java/net/pterodactylus/sone/core/Core.java @@ -505,10 +505,7 @@ public class Core extends AbstractService implements SoneProvider, PostProvider, */ public long getSoneFollowingTime(Sone sone) { synchronized (soneFollowingTimes) { - if (soneFollowingTimes.containsKey(sone)) { - return soneFollowingTimes.get(sone); - } - return Long.MAX_VALUE; + return Optional.fromNullable(soneFollowingTimes.get(sone.getId())).or(Long.MAX_VALUE); } }