No need to check for the stop job.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 3 Aug 2014 18:55:33 +0000 (20:55 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 3 Aug 2014 18:55:33 +0000 (20:55 +0200)
The stop job can not be in the queue without stop() having been called.

src/main/java/net/pterodactylus/sone/core/WebOfTrustUpdater.java

index 539897a..ce68797 100644 (file)
@@ -230,7 +230,7 @@ public class WebOfTrustUpdater extends AbstractService {
                while (!shouldStop()) {
                        try {
                                WebOfTrustUpdateJob updateJob = updateJobs.take();
-                               if (shouldStop() || (updateJob == stopJob)) {
+                               if (shouldStop()) {
                                        break;
                                }
                                logger.log(Level.FINE, "Running Trust Update Job: " + updateJob);