From 428a71042507e2fe0fce5b1b144ed60ec49d3183 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 30 Apr 2015 06:39:32 +0200 Subject: [PATCH] Return unmodifiable view of packs --- src/main/java/net/pterodactylus/xdcc/data/Bot.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/pterodactylus/xdcc/data/Bot.java b/src/main/java/net/pterodactylus/xdcc/data/Bot.java index 0f09671..c9e2a9b 100644 --- a/src/main/java/net/pterodactylus/xdcc/data/Bot.java +++ b/src/main/java/net/pterodactylus/xdcc/data/Bot.java @@ -20,6 +20,7 @@ package net.pterodactylus.xdcc.data; import static com.google.common.base.Preconditions.checkNotNull; import java.util.Collection; +import java.util.Collections; import java.util.Iterator; import java.util.Map; @@ -83,7 +84,7 @@ public class Bot implements Iterable { */ public Collection packs() { synchronized (packs) { - return packs.values(); + return Collections.unmodifiableCollection(packs.values()); } } -- 2.7.4