-
Notifications
You must be signed in to change notification settings - Fork 88
Closed
Feature
Copy link
Labels
Description
What version of OpenRewrite are you using?
I am using the latest as of 2024-09-20
How are you running OpenRewrite?
Gradle by editing build file, confirmed by tests on this repository:
What is the smallest, simplest way to reproduce the problem?
in short:
Integer i = 1+1;
assertThat(i).isNotNull();
assertThat(i).isEqualTo(2);
What did you expect to see?
Integer i = 1+1;
assertThat(i).isNotNull().isEqualTo(2);
What did you see instead?
no change
What is the full stack trace of any errors you encountered?
CollapseConsecutiveAssertThatStatementsTest > collapseAssertThatsOnInteger() FAILED
java.lang.AssertionError: Recipe was expected to make a change but made no changes.
at org.openrewrite.test.LargeSourceSetCheckingExpectedCycles.afterCycle(LargeSourceSetCheckingExpectedCycles.java:119)
at org.openrewrite.RecipeScheduler.runRecipeCycles(RecipeScheduler.java:98)
at org.openrewrite.RecipeScheduler.scheduleRun(RecipeScheduler.java:41)
at org.openrewrite.Recipe.run(Recipe.java:376)
at org.openrewrite.test.RewriteTest.rewriteRun(RewriteTest.java:371)
at org.openrewrite.test.RewriteTest.rewriteRun(RewriteTest.java:130)
at org.openrewrite.test.RewriteTest.rewriteRun(RewriteTest.java:125)
at org.openrewrite.java.testing.assertj.CollapseConsecutiveAssertThatStatementsTest.collapseAssertThatsOnInteger(CollapseConsecutiveAssertThatStatementsTest.java:197)
Context
The existing test are all on List
s, so maybe the recipe currently only works on those and other types need to be enabled in general.
Are you interested in contributing a fix to OpenRewrite?
No
timtebeek
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done