X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ffreenet%2Fwot%2FIdentityManager.java;h=2459c069487b69be21c6b6c31ebb7642ea0103d6;hb=abdbf862767ed420c556669bf002960968f0090b;hp=29334836da39d940765bbe8b70c158c0b1ffa9d7;hpb=133def7f9b2c97c03aed4edb6af831460a801394;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/freenet/wot/IdentityManager.java b/src/main/java/net/pterodactylus/sone/freenet/wot/IdentityManager.java index 2933483..2459c06 100644 --- a/src/main/java/net/pterodactylus/sone/freenet/wot/IdentityManager.java +++ b/src/main/java/net/pterodactylus/sone/freenet/wot/IdentityManager.java @@ -54,12 +54,6 @@ import com.google.inject.name.Named; */ public class IdentityManager extends AbstractService { - /** Object used for synchronization. */ - @SuppressWarnings("hiding") - private final Object syncObject = new Object() { - /* inner class for better lock names. */ - }; - /** The logger. */ private static final Logger logger = Logging.getLogger(IdentityManager.class); @@ -121,7 +115,7 @@ public class IdentityManager extends AbstractService { * @return All own identities */ public Set getAllOwnIdentities() { - synchronized (syncObject) { + synchronized (currentOwnIdentities) { return new HashSet(currentOwnIdentities); } } @@ -142,7 +136,7 @@ public class IdentityManager extends AbstractService { detectChangesInIdentities(currentOwnIdentities, currentIdentities, oldIdentities); oldIdentities = currentIdentities; - synchronized (syncObject) { + synchronized (currentOwnIdentities) { this.currentOwnIdentities.clear(); this.currentOwnIdentities.addAll(currentOwnIdentities); }