From e9486c537c2fba50ed111097a2199cbd2df403c1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 15 Dec 2010 05:42:38 +0100 Subject: [PATCH] Fix identity checking. --- .../java/net/pterodactylus/sone/freenet/wot/IdentityManager.java | 6 +++--- 1 file changed, 3 insertions(+), 3 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 dbf4206..aac5cd8 100644 --- a/src/main/java/net/pterodactylus/sone/freenet/wot/IdentityManager.java +++ b/src/main/java/net/pterodactylus/sone/freenet/wot/IdentityManager.java @@ -204,15 +204,15 @@ public class IdentityManager extends AbstractService { } /* find new identities. */ - for (Identity currentIdentity : currentIdentities.get(ownIdentities).values()) { - if (!oldIdentities.containsKey(currentIdentity.getId())) { + for (Identity currentIdentity : currentIdentities.get(ownIdentity).values()) { + if (!oldIdentities.containsKey(ownIdentity) || !oldIdentities.get(ownIdentity).containsKey(currentIdentity.getId())) { identityListenerManager.fireIdentityAdded(ownIdentity, currentIdentity); } } /* find removed identities. */ if (oldIdentities.containsKey(ownIdentity)) { - for (Identity oldIdentity : oldIdentities.get(ownIdentities).values()) { + for (Identity oldIdentity : oldIdentities.get(ownIdentity).values()) { if (!currentIdentities.containsKey(oldIdentity.getId())) { identityListenerManager.fireIdentityRemoved(ownIdentity, oldIdentity); } -- 2.7.4