From: David ‘Bombe’ Roden Date: Mon, 18 Oct 2010 19:47:34 +0000 (+0200) Subject: Blocking or unblocking sites inserts a new update of a Sone. X-Git-Tag: 0.1-RC1~214 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=7c85033af8457c99cb87feb930f228de0abf70fe;p=Sone.git Blocking or unblocking sites inserts a new update of a Sone. --- diff --git a/src/main/java/net/pterodactylus/sone/data/Sone.java b/src/main/java/net/pterodactylus/sone/data/Sone.java index 9d59407..3e808a8 100644 --- a/src/main/java/net/pterodactylus/sone/data/Sone.java +++ b/src/main/java/net/pterodactylus/sone/data/Sone.java @@ -407,8 +407,10 @@ public class Sone { * @param soneId * The Sone ID to block */ - public void addBlockedSoneId(String soneId) { - blockedSoneIds.add(soneId); + public synchronized void addBlockedSoneId(String soneId) { + if (blockedSoneIds.add(soneId)) { + modificationCounter++; + } } /** @@ -417,8 +419,10 @@ public class Sone { * @param soneId * The Sone ID to unblock */ - public void removeBlockedSoneId(String soneId) { - blockedSoneIds.remove(soneId); + public synchronized void removeBlockedSoneId(String soneId) { + if (blockedSoneIds.remove(soneId)) { + modificationCounter++; + } } /**