Correctly clone enum set.
Dieser Commit ist enthalten in:
Ursprung
18f5998f8a
Commit
b27922dd3d
@ -237,7 +237,7 @@ public class ListeningWhitelist {
|
|||||||
* @return A copy of the enum set.
|
* @return A copy of the enum set.
|
||||||
*/
|
*/
|
||||||
private static <T extends Enum<T>> EnumSet<T> safeEnumSet(Collection<T> options, Class<T> enumClass) {
|
private static <T extends Enum<T>> EnumSet<T> safeEnumSet(Collection<T> options, Class<T> enumClass) {
|
||||||
if (options != null) {
|
if (options != null && !options.isEmpty()) {
|
||||||
return EnumSet.copyOf(options);
|
return EnumSet.copyOf(options);
|
||||||
} else {
|
} else {
|
||||||
return EnumSet.noneOf(enumClass);
|
return EnumSet.noneOf(enumClass);
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren