diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJEnumerableRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJEnumerableRules.java index 84aaca2f17..1ba868e308 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJEnumerableRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJEnumerableRules.java @@ -26,8 +26,7 @@ void before(EnumerableAssert enumAssert) { @BeforeTemplate void before(AbstractIterableAssert enumAssert) { - Refaster.anyOf( - enumAssert.size().isNotPositive(), enumAssert.size().isNotPositive().returnToIterable()); + enumAssert.size().isNotPositive(); } @AfterTemplate diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/AssertJEnumerableRulesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/AssertJEnumerableRulesTestInput.java index 3f6b215100..25231527a5 100644 --- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/AssertJEnumerableRulesTestInput.java +++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/AssertJEnumerableRulesTestInput.java @@ -19,7 +19,6 @@ void testEnumerableAssertIsEmpty() { assertThat(ImmutableSet.of(2)).hasSizeLessThanOrEqualTo(0); assertThat(ImmutableSet.of(3)).hasSizeLessThan(1); assertThat(ImmutableSet.of(4)).size().isNotPositive(); - assertThat(ImmutableSet.of(5)).size().isNotPositive().returnToIterable(); } ImmutableSet> testEnumerableAssertIsNotEmpty() { diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/AssertJEnumerableRulesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/AssertJEnumerableRulesTestOutput.java index e8e6bb0810..8341cbf5e8 100644 --- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/AssertJEnumerableRulesTestOutput.java +++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/AssertJEnumerableRulesTestOutput.java @@ -19,7 +19,6 @@ void testEnumerableAssertIsEmpty() { assertThat(ImmutableSet.of(2)).isEmpty(); assertThat(ImmutableSet.of(3)).isEmpty(); assertThat(ImmutableSet.of(4)).isEmpty(); - assertThat(ImmutableSet.of(5)).isEmpty(); } ImmutableSet> testEnumerableAssertIsNotEmpty() {