Private method `findNodeById(java.util.List<org.apache.maven.api.xml.XmlNode>, java.lang.String)` is never used
Private method findNodeById(java.util.List<org.apache.maven.api.xml.XmlNode>, java.lang.String) is never used
- https://github.com/apache/maven/pull/2310
- https://github.com/apache/maven/pull/2310#issuecomment-2877236604
What version of OpenRewrite are you using?
I am using
- OpenRewrite v1.2.3
- Maven/Gradle plugin v1.2.3
- rewrite-module v1.2.3
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>1.2.3</version>
<configuration>
...
</configuration>
</plugin>
What is the smallest, simplest way to reproduce the problem?
class A {
void foo(String bar) {
int i = 5;
}
}
What did you expect to see?
class A {
void foo(String bar) {
int i = 5;
}
}
What did you see instead?
class A {
void foo(String bar) {
int i = 5;
}
}
What is the full stack trace of any errors you encountered?
stacktrace output here
Are you interested in contributing a fix to OpenRewrite?
We already have a recipe that does this: https://github.com/openrewrite/rewrite-static-analysis/blob/9c48fb1144f710a9672ab2dd9074ebe1b42fc73a/src/test/java/org/openrewrite/staticanalysis/RemoveUnusedPrivateMethodsTest.java#L35-L67
We can reopen if there's a reproducer unit test, or when there's more details to share based on attaching a JVM debugger: https://docs.moderne.io/user-documentation/moderne-ide-integration/how-to-guides/debugging-recipes/#step-4-debug-your-recipe