From fc618f3bd07fdb608dedc2ee80dc697ca108ea65 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 27 Sep 2014 20:40:38 +0200 Subject: [PATCH] Return a copy of the Sones. --- .../java/net/pterodactylus/sone/database/memory/MemoryDatabase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); } -- 2.7.4