From 176d7c668f93943ebe8a207f4ac990d855314109 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Fri, 6 May 2011 23:34:00 +0200 Subject: [PATCH] Use a boolean instead of abusing ownIdentities. --- .../java/net/pterodactylus/sone/freenet/wot/IdentityManager.java | 5 +++-- 1 file changed, 3 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 acd8633..3c97e55 100644 --- a/src/main/java/net/pterodactylus/sone/freenet/wot/IdentityManager.java +++ b/src/main/java/net/pterodactylus/sone/freenet/wot/IdentityManager.java @@ -181,6 +181,7 @@ public class IdentityManager extends AbstractService { Map currentOwnIdentities = new HashMap(); Set ownIdentities = null; + boolean identitiesLoaded = false; try { /* get all identities with the wanted context from WoT. */ ownIdentities = webOfTrustConnector.loadAllOwnIdentities(); @@ -199,12 +200,12 @@ public class IdentityManager extends AbstractService { identities.put(identity.getId(), identity); } } + identitiesLoaded = true; } catch (WebOfTrustException wote1) { logger.log(Level.WARNING, "WoT has disappeared!", wote1); - ownIdentities = null; } - if (ownIdentities != null) { + if (identitiesLoaded) { /* check for changes. */ checkOwnIdentities(currentOwnIdentities); -- 2.7.4