From f555b56519ab71b7507f92006fc070225ef27dac Mon Sep 17 00:00:00 2001 From: Tim te Beek Date: Thu, 21 Nov 2024 13:18:31 +0100 Subject: [PATCH] Update method type as well when removing arguments --- .../spring/boot2/ConvertToSecurityDslVisitor.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/openrewrite/java/spring/boot2/ConvertToSecurityDslVisitor.java b/src/main/java/org/openrewrite/java/spring/boot2/ConvertToSecurityDslVisitor.java index f992dabf6..f372db40c 100644 --- a/src/main/java/org/openrewrite/java/spring/boot2/ConvertToSecurityDslVisitor.java +++ b/src/main/java/org/openrewrite/java/spring/boot2/ConvertToSecurityDslVisitor.java @@ -127,7 +127,7 @@ private J.Lambda createLambdaParam(String paramName, JavaType paramType, List(param, Space.EMPTY, Markers.EMPTY))), - Space.build(" ", Collections.emptyList()), + Space.build(" ", emptyList()), body, JavaType.Primitive.Void ); @@ -145,9 +145,19 @@ private J.MethodInvocation unfoldMethodInvocationChain(J.Identifier core, List computeAndMarkChain() { } } if (cursor == null || chain.isEmpty()) { - return Collections.emptyList(); + return emptyList(); } if (!(cursor.getValue() instanceof J.MethodInvocation)) { // top invocation is at the end of the chain - mark it. We'd need to strip off prefix from this invocation later