From e01b70a4ccf10908ffdf694d857c7df1d1d48dca Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 10 Nov 2010 21:02:02 +0100 Subject: [PATCH] Always check the full set of own identities. --- .../net/pterodactylus/sone/freenet/wot/IdentityManager.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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 ef8b3b6..7796557 100644 --- a/src/main/java/net/pterodactylus/sone/freenet/wot/IdentityManager.java +++ b/src/main/java/net/pterodactylus/sone/freenet/wot/IdentityManager.java @@ -263,6 +263,15 @@ public class IdentityManager extends AbstractService { Set ownIdentities; try { ownIdentities = webOfTrustConnector.loadAllOwnIdentities(); + + /* check for changes. */ + for (OwnIdentity ownIdentity : ownIdentities) { + currentOwnIdentities.put(ownIdentity.getId(), ownIdentity); + } + checkOwnIdentities(currentOwnIdentities); + + /* now filter for context and get all identities. */ + currentOwnIdentities.clear(); for (OwnIdentity ownIdentity : ownIdentities) { if ((context != null) && !ownIdentity.hasContext(context)) { continue; @@ -273,8 +282,6 @@ public class IdentityManager extends AbstractService { } } - checkOwnIdentities(currentOwnIdentities); - /* find removed identities. */ for (Identity oldIdentity : oldIdentities.values()) { if (!currentIdentities.containsKey(oldIdentity.getId())) { -- 2.7.4