Closed pway99 closed 2 years ago
RenamePrivateFieldsToCamelCase throws NPE
Describe what you expected to see.
class OverthereProcessStub extends DelegatingOverthereProcess implements Serializable {
* @author Kohsuke Kawaguchi */ class OverthereProcessStub extends DelegatingOverthereProcess implements Serializable { - OverthereProcessStub(OverthereProcess base) { + OverthereProcessStub(OverthereProcess /*~~(java.lang.NullPointerException: Cannot invoke "org.openrewrite.java.tree.JavaType$Variable.hasFlags(org.openrewrite.java.tree.Flag[])" because the return value of "org.openrewrite.java.tree.J$VariableDeclarations$NamedVariable.getVariableType()" is null + org.openrewrite.java.cleanup.RenamePrivateFieldsToCamelCase$RenameNonCompliantNames.visitVariable(RenamePrivateFieldsToCamelCase.java:101) + org.openrewrite.java.cleanup.RenamePrivateFieldsToCamelCase$RenameNonCompliantNames.visitVariable(RenamePrivateFieldsToCamelCase.java:76) + org.openrewrite.java.tree.J$VariableDeclarations$NamedVariable.acceptJava(J.java:5184) + org.openrewrite.java.tree.J.accept(J.java:55) + org.openrewrite.TreeVisitor.visit(TreeVisitor.java:206) + org.openrewrite.TreeVisitor.visitAndCast(TreeVisitor.java:285) + org.openrewrite.java.JavaVisitor.visitRightPadded(JavaVisitor.java:1220) + org.openrewrite.java.JavaVisitor.lambda$visitVariableDeclarations$27(JavaVisitor.java:882) + ...)~~>*/base) { super(base); }
org.openrewrite.java.cleanup.RenamePrivateFieldsToCamelCase
undefined
fixed by: eaf8b030ea6706bfdef2104210a14ec54160754e
Problem
Expected behavior
Example diff
class OverthereProcessStub extends DelegatingOverthereProcess implements Serializable {
Recipes in example diff:
org.openrewrite.java.cleanup.RenamePrivateFieldsToCamelCase
References:
undefined