diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ComparatorRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ComparatorRules.java index 438fbe8b6c..c15b466aa4 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ComparatorRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ComparatorRules.java @@ -62,8 +62,9 @@ Comparator before() { Comparator.naturalOrder().reversed()); } + // XXX: Add `@UseImportPolicy(STATIC_IMPORT_ALWAYS)` if/when + // https://github.com/google/error-prone/pull/3584 is merged and released. @AfterTemplate - @UseImportPolicy(STATIC_IMPORT_ALWAYS) Comparator after() { return reverseOrder(); } diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/ComparatorRulesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/ComparatorRulesTestOutput.java index 743b859c59..9c27527ddf 100644 --- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/ComparatorRulesTestOutput.java +++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/ComparatorRulesTestOutput.java @@ -32,7 +32,8 @@ ImmutableSet> testNaturalOrder() { } ImmutableSet> testReverseOrder() { - return ImmutableSet.of(reverseOrder(), reverseOrder(), reverseOrder()); + return ImmutableSet.of( + Comparator.reverseOrder(), Comparator.reverseOrder(), Comparator.reverseOrder()); } ImmutableSet> testCustomComparator() {