From: David ‘Bombe’ Roden Date: Mon, 19 Sep 2011 19:17:37 +0000 (+0200) Subject: Remove all existing targets before scanning for new targets. X-Git-Tag: 0.0.8^2~9 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=befa0c12ba6d90d47bd7d15bd9fedb1f58cc6de2;p=WoTNS.git Remove all existing targets before scanning for new targets. --- diff --git a/src/main/java/net/pterodactylus/wotns/main/IdentityTargets.java b/src/main/java/net/pterodactylus/wotns/main/IdentityTargets.java index 2eacd08..1266874 100644 --- a/src/main/java/net/pterodactylus/wotns/main/IdentityTargets.java +++ b/src/main/java/net/pterodactylus/wotns/main/IdentityTargets.java @@ -56,6 +56,7 @@ public class IdentityTargets implements Iterable> { private void scanForTargets() { synchronized (targets) { + targets.clear(); for (Entry property : identity.getProperties().entrySet()) { if (property.getKey().startsWith("tns.")) { targets.put(property.getKey().substring(4), property.getValue());