X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fcore%2FWebOfTrustUpdater.java;h=67bf3ac43d11cc7c82a643319dea8436b9e80e0e;hp=64d97ad343d60c0cac86d09b23ac93b608ed38ef;hb=ec3c258bb44850c61a7c137b1746f7a8432a3c6c;hpb=7d336ec14294bf661c7257d8cded62201c840d34 diff --git a/src/main/java/net/pterodactylus/sone/core/WebOfTrustUpdater.java b/src/main/java/net/pterodactylus/sone/core/WebOfTrustUpdater.java index 64d97ad..67bf3ac 100644 --- a/src/main/java/net/pterodactylus/sone/core/WebOfTrustUpdater.java +++ b/src/main/java/net/pterodactylus/sone/core/WebOfTrustUpdater.java @@ -113,25 +113,6 @@ public class WebOfTrustUpdater extends AbstractService { * otherwise */ public boolean addContextWait(OwnIdentity ownIdentity, String context) { - return addContextWait(ownIdentity, context, true); - } - - /** - * Adds the given context to the given own identity, waiting for completion of - * the operation. - * - * @param ownIdentity - * The own identity to add the context to - * @param context - * The context to add - * @param wait - * {@code true} to wait for the end of the operation, {@code false} to return - * immediately - * @return {@code true} if the context was added successfully, {@code false} if - * the context was not added successfully, or if the job should not - * wait for completion - */ - private boolean addContextWait(OwnIdentity ownIdentity, String context, boolean wait) { AddContextJob addContextJob = new AddContextJob(ownIdentity, context); if (!updateJobs.contains(addContextJob)) { logger.log(Level.FINER, "Adding Context Job: " + addContextJob); @@ -140,10 +121,8 @@ public class WebOfTrustUpdater extends AbstractService { } catch (InterruptedException ie1) { /* the queue is unbounded so it should never block. */ } - if (wait) { - return addContextJob.waitForCompletion(); - } - } else if (wait) { + return addContextJob.waitForCompletion(); + } else { for (WebOfTrustUpdateJob updateJob : updateJobs) { if (updateJob.equals(addContextJob)) { return updateJob.waitForCompletion();