From 775d4caf9a15367785edd31d9cc411d67bdfb5ac Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 13 Oct 2012 10:06:30 +0200 Subject: [PATCH] Always store all own identities. --- .../java/net/pterodactylus/sone/freenet/wot/IdentityManager.java | 9 ++++++--- 1 file changed, 6 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 bca6ac1..568a637 100644 --- a/src/main/java/net/pterodactylus/sone/freenet/wot/IdentityManager.java +++ b/src/main/java/net/pterodactylus/sone/freenet/wot/IdentityManager.java @@ -186,14 +186,17 @@ public class IdentityManager extends AbstractService { /* load trusted identities. */ for (OwnIdentity ownIdentity : ownIdentities) { + currentOwnIdentities.put(ownIdentity.getId(), ownIdentity); + Map identities = new HashMap(); + currentIdentities.put(ownIdentity, identities); + + /* if the context doesn’t match, skip getting trusted identities. */ if ((context != null) && !ownIdentity.hasContext(context)) { continue; } - currentOwnIdentities.put(ownIdentity.getId(), ownIdentity); + /* load trusted identities. */ Set trustedIdentities = webOfTrustConnector.loadTrustedIdentities(ownIdentity, context); - Map identities = new HashMap(); - currentIdentities.put(ownIdentity, identities); for (Identity identity : trustedIdentities) { identities.put(identity.getId(), identity); } -- 2.7.4