From b27922dd3de0b4bf3e60d529721b112d0dcd1aa8 Mon Sep 17 00:00:00 2001 From: "Kristian S. Stangeland" Date: Wed, 7 Aug 2013 00:33:23 +0200 Subject: [PATCH] Correctly clone enum set. --- .../java/com/comphenix/protocol/events/ListeningWhitelist.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/events/ListeningWhitelist.java b/ProtocolLib/src/main/java/com/comphenix/protocol/events/ListeningWhitelist.java index d82aa253..61ab901c 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/events/ListeningWhitelist.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/events/ListeningWhitelist.java @@ -237,7 +237,7 @@ public class ListeningWhitelist { * @return A copy of the enum set. */ private static > EnumSet safeEnumSet(Collection options, Class enumClass) { - if (options != null) { + if (options != null && !options.isEmpty()) { return EnumSet.copyOf(options); } else { return EnumSet.noneOf(enumClass);