From 2f1b95752f107e9fc2fcded9ff00321d9c06b59a Mon Sep 17 00:00:00 2001 From: Knut Wannheden Date: Tue, 15 Oct 2024 13:57:06 +0200 Subject: [PATCH] Align `KotlinJavaPrinter#visitModifier()` with `JavaPrinter` --- .../java/org/openrewrite/kotlin/internal/KotlinPrinter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/openrewrite/kotlin/internal/KotlinPrinter.java b/src/main/java/org/openrewrite/kotlin/internal/KotlinPrinter.java index 6820fb83..2298b121 100755 --- a/src/main/java/org/openrewrite/kotlin/internal/KotlinPrinter.java +++ b/src/main/java/org/openrewrite/kotlin/internal/KotlinPrinter.java @@ -1272,7 +1272,7 @@ public M visitMarker(Marker marker, PrintOutputCapture

p) * Does not print the final modifier, as it is not supported in Kotlin. */ @Override - protected void visitModifier(J.Modifier mod, PrintOutputCapture

p) { + public J visitModifier(J.Modifier mod, PrintOutputCapture

p) { visit(mod.getAnnotations(), p); String keyword = ""; switch (mod.getType()) { @@ -1322,6 +1322,7 @@ protected void visitModifier(J.Modifier mod, PrintOutputCapture

p) { beforeSyntax(mod, Space.Location.MODIFIER_PREFIX, p); p.append(keyword); afterSyntax(mod, p); + return mod; } @Override