From: David ‘Bombe’ Roden Date: Sat, 18 Dec 2010 01:07:35 +0000 (+0100) Subject: Simplify removal of ticker object, ensure that the notification is removed. X-Git-Tag: beta-freefall-0.6.2-1~179 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=0bbc9d8da7dfae93fe4e7b08dbb11a99332dc17f;p=Sone.git Simplify removal of ticker object, ensure that the notification is removed. --- diff --git a/src/main/java/net/pterodactylus/sone/web/WebInterface.java b/src/main/java/net/pterodactylus/sone/web/WebInterface.java index 6248d0f..d3ec1ee 100644 --- a/src/main/java/net/pterodactylus/sone/web/WebInterface.java +++ b/src/main/java/net/pterodactylus/sone/web/WebInterface.java @@ -696,12 +696,8 @@ public class WebInterface implements CoreListener { */ @Override public void soneUnlocked(Sone sone) { - Object tickerObject = lockedSonesTickerObjects.remove(sone); - if (tickerObject == null) { - return; - } lockedSonesNotification.remove(sone); - Ticker.getInstance().deregisterEvent(tickerObject); + Ticker.getInstance().deregisterEvent(lockedSonesTickerObjects.remove(sone)); } /**