Skip to content

Commit b90e181

Browse files
committed
Correct bug in HttpSessionInvalidate
The `select` shouldn't be a `J.VariableDeclarations$NamedVariable`, but that variable's `J.Identifier`. This is important, because the former is not actually an instance of `Expression`, but this isn't detected due to Java's type erasure.
1 parent 661d0a8 commit b90e181

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/openrewrite/java/migrate/javax/HttpSessionInvalidate.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public J.MethodInvocation visitMethodInvocation(J.MethodInvocation method, Execu
7676
method = logoutTemplate.apply(
7777
getCursor(),
7878
method.getCoordinates().replace(),
79-
httpServletRequestDeclaration.getVariables().get(0)
79+
httpServletRequestDeclaration.getVariables().get(0).getName()
8080
);
8181
}
8282
return super.visitMethodInvocation(method, ctx);

0 commit comments

Comments
 (0)