From: David ‘Bombe’ Roden Date: Wed, 15 Dec 2010 04:42:38 +0000 (+0100) Subject: Fix identity checking. X-Git-Tag: 0.4^2~8^2~55 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=e9486c537c2fba50ed111097a2199cbd2df403c1;p=Sone.git Fix identity checking. --- 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); }