Return a copy of the Sones.
[Sone.git] / 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();
                }