Simplify removal of ticker object, ensure that the notification is removed.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 18 Dec 2010 01:07:35 +0000 (02:07 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 18 Dec 2010 01:07:35 +0000 (02:07 +0100)
src/main/java/net/pterodactylus/sone/web/WebInterface.java

index 6248d0f..d3ec1ee 100644 (file)
@@ -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));
        }
 
        /**