Return a copy of the values.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 4 Jul 2013 17:29:53 +0000 (19:29 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 4 Jul 2013 17:29:53 +0000 (19:29 +0200)
src/main/java/net/pterodactylus/sone/core/Core.java

index 7232b72..827729c 100644 (file)
@@ -334,7 +334,7 @@ public class Core extends AbstractService implements SoneProvider, PostProvider,
        @Override
        public Collection<Sone> getSones() {
                synchronized (sones) {
-                       return Collections.unmodifiableCollection(sones.values());
+                       return ImmutableSet.copyOf(sones.values());
                }
        }