Skip to content

Commit

Permalink
Add @JsonCreator for KReturn to fix LST deserialization issue
Browse files Browse the repository at this point in the history
  • Loading branch information
kunli2 committed Sep 8, 2023
1 parent 456e275 commit 1ccb03d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/org/openrewrite/kotlin/tree/K.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package org.openrewrite.kotlin.tree;

import com.fasterxml.jackson.annotation.JsonAlias;
import com.fasterxml.jackson.annotation.JsonCreator;
import lombok.*;
import lombok.experimental.FieldDefaults;
import lombok.experimental.NonFinal;
Expand Down Expand Up @@ -884,6 +885,7 @@ public KReturn(UUID id, Return expression, @Nullable J.Identifier label) {
this(id, Collections.emptyList(), expression, label);
}

@JsonCreator
public KReturn(UUID id, List<Annotation> annotations, Return expression, @Nullable J.Identifier label) {
this.id = id;
this.annotations = annotations;
Expand Down

0 comments on commit 1ccb03d

Please sign in to comment.