Browse code

Fix: can't create enumset from empty flags list

Thomas Cataldo authored on 05/12/2018 17:35:14
Showing 1 changed files
... ...
@@ -55,7 +55,7 @@ public class ItemValue<T> {
55 55
 		ret.displayName = item.displayName;
56 56
 		ret.value = value;
57 57
 		ret.internalId = item.internalId;
58
-		ret.flags = EnumSet.copyOf(item.flags);
58
+		ret.flags = item.flags.isEmpty() ? EnumSet.noneOf(ItemFlag.class) : EnumSet.copyOf(item.flags);
59 59
 		return ret;
60 60
 
61 61
 	}