From 1f7b1040e3df48ca89f1e7fbf79ad61e0ebc21ce Mon Sep 17 00:00:00 2001 From: Tim te Beek Date: Thu, 9 Jan 2025 19:28:48 +0100 Subject: [PATCH] `TrailingComma` is now printed in `super.visitMarker` (#623) --- .../java/org/openrewrite/kotlin/internal/KotlinPrinter.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/main/java/org/openrewrite/kotlin/internal/KotlinPrinter.java b/src/main/java/org/openrewrite/kotlin/internal/KotlinPrinter.java index 595ac68b..8076c726 100755 --- a/src/main/java/org/openrewrite/kotlin/internal/KotlinPrinter.java +++ b/src/main/java/org/openrewrite/kotlin/internal/KotlinPrinter.java @@ -1257,13 +1257,7 @@ protected void visitStatement(@Nullable JRightPadded paddedStat, JRig public M visitMarker(Marker marker, PrintOutputCapture

p) { if (marker instanceof Semicolon) { p.append(';'); - } else if (marker instanceof TrailingComma) { - // TODO consider adding cursor message to only print for last element in list - // TODO the space should then probably be printed anyway (could contain a comment) - p.append(','); - visitSpace(((TrailingComma) marker).getSuffix(), Space.Location.LANGUAGE_EXTENSION, p); } - return super.visitMarker(marker, p); }