diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/StaticImportCheck.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/StaticImportCheck.java index 4bbcc6c1747..8daca7184a5 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/StaticImportCheck.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/StaticImportCheck.java @@ -64,7 +64,6 @@ public final class StaticImportCheck extends BugChecker implements MemberSelectT "com.mongodb.client.model.Sorts", "com.mongodb.client.model.Updates", "java.nio.charset.StandardCharsets", - "java.util.Collections", "java.util.Comparator", "java.util.Map.Entry", "java.util.stream.Collectors", @@ -110,6 +109,26 @@ public final class StaticImportCheck extends BugChecker implements MemberSelectT .put("com.google.common.collect.ImmutableTable", "toImmutableTable") .put("com.google.common.collect.Sets", "toImmutableEnumSet") .put("com.google.common.base.Functions", "identity") + .putAll( + "java.util.Collections", + "disjoint", + "emptyList", + "emptyMap", + "emptySet", + "reverse", + "singleton", + "singletonList", + "singletonMap", + "synchronizedCollection", + "synchronizedList", + "synchronizedMap", + "synchronizedNavigableMap", + "synchronizedSet", + "unmodifiableCollection", + "unmodifiableList", + "unmodifiableMap", + "unmodifiableNavigableSet", + "unmodifiableSet") .put("java.util.function.Function", "identity") .put("java.util.function.Predicate", "not") .put("org.junit.jupiter.params.provider.Arguments", "arguments")