What version of OpenRewrite are you using?
I am using
- OpenRewrite v8.7.2
- Maven plugin v5.8.1
- rewrite-static-analysis v1.0.8
How are you running OpenRewrite?
I am using the Maven plugin, and my project is a single module project.
<plugin>
<groupId>org.openrewrite.maven</groupId>
<artifactId>rewrite-maven-plugin</artifactId>
<version>5.8.1</version>
<configuration>
<activeRecipes>
<recipe>org.openrewrite.staticanalysis.SimplifyConstantIfBranchExecution</recipe>
</activeRecipes>
</configuration>
<dependencies>
<dependency>
<groupId>org.openrewrite.recipe</groupId>
<artifactId>rewrite-static-analysis</artifactId>
<version>1.0.8</version>
</dependency>
</dependencies>
</plugin>
What is the smallest, simplest way to reproduce the problem?
class A {
public int foo() {
if (true) {
return 5;
}
return 6;
}
}
What did you expect to see?
class A {
public int foo() {
return 5;
}
}
What did you see instead?
class A {
public int foo() {
if (true) {
return 5;
}
return 6;
}
}
What is the full stack trace of any errors you encountered?
No errors.
Yes, I'm interested in contributing a fix.
What version of OpenRewrite are you using?
I am using
How are you running OpenRewrite?
I am using the Maven plugin, and my project is a single module project.
What is the smallest, simplest way to reproduce the problem?
What did you expect to see?
What did you see instead?
What is the full stack trace of any errors you encountered?
No errors.
Are you interested in contributing a fix to OpenRewrite?
Yes, I'm interested in contributing a fix.