From: David ‘Bombe’ Roden Date: Sat, 27 Sep 2014 18:40:38 +0000 (+0200) Subject: Return a copy of the Sones. X-Git-Tag: 0.9-rc1^2~3^2~99 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=fc618f3bd07fdb608dedc2ee80dc697ca108ea65;p=Sone.git Return a copy of the Sones. --- diff --git a/src/main/java/net/pterodactylus/sone/database/memory/MemoryDatabase.java b/src/main/java/net/pterodactylus/sone/database/memory/MemoryDatabase.java index 6113d26..d129d87 100644 --- a/src/main/java/net/pterodactylus/sone/database/memory/MemoryDatabase.java +++ b/src/main/java/net/pterodactylus/sone/database/memory/MemoryDatabase.java @@ -233,7 +233,7 @@ public class MemoryDatabase extends AbstractService implements Database { public Collection getSones() { lock.readLock().lock(); try { - return unmodifiableCollection(allSones.values()); + return new HashSet(allSones.values()); } finally { lock.readLock().unlock(); }