|
|
|
@ -20,6 +20,7 @@ import java.util.Collections; |
|
|
|
import java.util.LinkedHashSet; |
|
|
|
import java.util.LinkedHashSet; |
|
|
|
import java.util.Set; |
|
|
|
import java.util.Set; |
|
|
|
import java.util.function.Predicate; |
|
|
|
import java.util.function.Predicate; |
|
|
|
|
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Member predicate that matches based on {@code include} and {@code exclude} sets. |
|
|
|
* Member predicate that matches based on {@code include} and {@code exclude} sets. |
|
|
|
@ -54,12 +55,12 @@ class IncludeExcludeGroupMemberPredicate implements Predicate<String> { |
|
|
|
if (names == null) { |
|
|
|
if (names == null) { |
|
|
|
return Collections.emptySet(); |
|
|
|
return Collections.emptySet(); |
|
|
|
} |
|
|
|
} |
|
|
|
Set<String> cleaned = new LinkedHashSet<>(names); |
|
|
|
Set<String> cleaned = names.stream().map(this::clean).collect(Collectors.toCollection(LinkedHashSet::new)); |
|
|
|
return Collections.unmodifiableSet(cleaned); |
|
|
|
return Collections.unmodifiableSet(cleaned); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private String clean(String name) { |
|
|
|
private String clean(String name) { |
|
|
|
return name.trim().toLowerCase(); |
|
|
|
return name.trim(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|