From d8f787ea2b94de403ef0ab989282643423d7131c Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 26 Jun 2014 20:21:14 +0200 Subject: [PATCH] Synchronize all access on the current own identities. --- src/main/java/net/pterodactylus/sone/freenet/wot/IdentityManager.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 9f9ab7f..6f33a4a 100644 --- a/src/main/java/net/pterodactylus/sone/freenet/wot/IdentityManager.java +++ b/src/main/java/net/pterodactylus/sone/freenet/wot/IdentityManager.java @@ -150,7 +150,9 @@ public class IdentityManager extends AbstractService { * @return All own identities */ public Set getAllOwnIdentities() { - return new HashSet(currentOwnIdentities.values()); + synchronized (syncObject) { + return new HashSet(currentOwnIdentities.values()); + } } // -- 2.7.4