Remove all existing targets before scanning for new targets.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 19 Sep 2011 19:17:37 +0000 (21:17 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 19 Sep 2011 19:17:37 +0000 (21:17 +0200)
src/main/java/net/pterodactylus/wotns/main/IdentityTargets.java

index 2eacd08..1266874 100644 (file)
@@ -56,6 +56,7 @@ public class IdentityTargets implements Iterable<Entry<String, String>> {
 
        private void scanForTargets() {
                synchronized (targets) {
+                       targets.clear();
                        for (Entry<String, String> property : identity.getProperties().entrySet()) {
                                if (property.getKey().startsWith("tns.")) {
                                        targets.put(property.getKey().substring(4), property.getValue());