Return a copy of the Sones.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 27 Sep 2014 18:40:38 +0000 (20:40 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 27 Sep 2014 18:40:38 +0000 (20:40 +0200)
src/main/java/net/pterodactylus/sone/database/memory/MemoryDatabase.java

index 6113d26..d129d87 100644 (file)
@@ -233,7 +233,7 @@ public class MemoryDatabase extends AbstractService implements Database {
        public Collection<Sone> getSones() {
                lock.readLock().lock();
                try {
-                       return unmodifiableCollection(allSones.values());
+                       return new HashSet<Sone>(allSones.values());
                } finally {
                        lock.readLock().unlock();
                }