diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refastertemplates/AssertJThrowingCallableTemplates.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refastertemplates/AssertJThrowingCallableTemplates.java index c507dd878e..29afc7df67 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refastertemplates/AssertJThrowingCallableTemplates.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refastertemplates/AssertJThrowingCallableTemplates.java @@ -268,9 +268,9 @@ static final class AssertThatThrownByIOException { } static final class AssertThatThrownByIOExceptionHasMessage { + @BeforeTemplate @SuppressWarnings( "AssertThatThrownByIOException" /* Matches strictly more specific expressions. */) - @BeforeTemplate AbstractObjectAssert before(ThrowingCallable throwingCallable, String message) { return assertThatIOException().isThrownBy(throwingCallable).withMessage(message); } diff --git a/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/ScheduledTransactionTraceCheckTest.java b/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/ScheduledTransactionTraceCheckTest.java index e56f831d80..77b37e8c11 100644 --- a/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/ScheduledTransactionTraceCheckTest.java +++ b/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/ScheduledTransactionTraceCheckTest.java @@ -47,8 +47,8 @@ void identification() { // XXX: Enable this test for all JREs once https://github.com/google/error-prone/pull/2820 is // merged and released. - @Test @DisabledForJreRange(min = JRE.JAVA_12) + @Test void replacement() { refactoringTestHelper .addInputLines(