From d6ca42c7f690d650782b46095de00eccecb19c17 Mon Sep 17 00:00:00 2001 From: Oleh Dokuka Date: Fri, 17 Jan 2025 15:49:14 +0200 Subject: [PATCH 1/2] keep old constructor for backward compatibility --- rewrite-java/src/main/java/org/openrewrite/java/tree/J.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rewrite-java/src/main/java/org/openrewrite/java/tree/J.java b/rewrite-java/src/main/java/org/openrewrite/java/tree/J.java index 592e839a3e3..c29649015e6 100644 --- a/rewrite-java/src/main/java/org/openrewrite/java/tree/J.java +++ b/rewrite-java/src/main/java/org/openrewrite/java/tree/J.java @@ -1094,6 +1094,11 @@ public Case withBody(J body) { @With Expression guard; + @JsonCreator + public Case(UUID id, Space prefix, Markers markers, Type type, @Deprecated @Nullable Expression pattern, @Nullable JContainer expressions, JContainer statements, @Nullable JRightPadded body) { + this(id, prefix, markers, type, pattern, expressions, null, null, statements, body); + } + @JsonCreator public Case(UUID id, Space prefix, Markers markers, Type type, @Deprecated @Nullable Expression pattern, @Nullable JContainer expressions, @Nullable JContainer caseLabels, @Nullable Expression guard, JContainer statements, @Nullable JRightPadded body) { this.id = id; From 6bc4a58ae00195652a5052e5987dcca9e4c4097d Mon Sep 17 00:00:00 2001 From: Oleh Dokuka Date: Fri, 17 Jan 2025 15:52:15 +0200 Subject: [PATCH 2/2] remove redundant space --- rewrite-java/src/main/java/org/openrewrite/java/tree/J.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rewrite-java/src/main/java/org/openrewrite/java/tree/J.java b/rewrite-java/src/main/java/org/openrewrite/java/tree/J.java index c29649015e6..5cd0451895b 100644 --- a/rewrite-java/src/main/java/org/openrewrite/java/tree/J.java +++ b/rewrite-java/src/main/java/org/openrewrite/java/tree/J.java @@ -1096,7 +1096,7 @@ public Case withBody(J body) { @JsonCreator public Case(UUID id, Space prefix, Markers markers, Type type, @Deprecated @Nullable Expression pattern, @Nullable JContainer expressions, JContainer statements, @Nullable JRightPadded body) { - this(id, prefix, markers, type, pattern, expressions, null, null, statements, body); + this(id, prefix, markers, type, pattern, expressions, null, null, statements, body); } @JsonCreator