From 26d2d2c5f03f579c7603a03c51b001eb0af9b36b Mon Sep 17 00:00:00 2001 From: lingenj Date: Fri, 27 Dec 2024 16:59:04 +0100 Subject: [PATCH] Support varargs --- .../main/java/org/openrewrite/groovy/GroovyParserVisitor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rewrite-groovy/src/main/java/org/openrewrite/groovy/GroovyParserVisitor.java b/rewrite-groovy/src/main/java/org/openrewrite/groovy/GroovyParserVisitor.java index e854d09b6d1..ae251f929dc 100644 --- a/rewrite-groovy/src/main/java/org/openrewrite/groovy/GroovyParserVisitor.java +++ b/rewrite-groovy/src/main/java/org/openrewrite/groovy/GroovyParserVisitor.java @@ -563,7 +563,7 @@ public void visitMethod(MethodNode method) { if (paramType instanceof J.ArrayType) { // E.g. foo(String... x) if (source.startsWith("...", cursor - 3)) { - varargs = format(source, cursor - 3, cursor - 3); + varargs = Space.EMPTY; paramType = ((J.ArrayType) paramType).withDimension(null); } // E.g. foo(String ... x)