Skip to content

Commit 7ac1bc8

Browse files
committed
Adjust Jackson annotations on JavaType
1 parent 98ce901 commit 7ac1bc8

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

rewrite-java/src/main/java/org/openrewrite/java/tree/JavaType.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@
1515
*/
1616
package org.openrewrite.java.tree;
1717

18-
import com.fasterxml.jackson.annotation.JsonCreator;
19-
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
20-
import com.fasterxml.jackson.annotation.JsonTypeInfo;
21-
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
18+
import com.fasterxml.jackson.annotation.*;
2219
import lombok.*;
2320
import lombok.experimental.FieldDefaults;
2421
import lombok.experimental.NonFinal;
@@ -359,6 +356,7 @@ class Class extends FullyQualified {
359356
@With
360357
@Nullable
361358
@NonFinal
359+
@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
362360
Integer managedReference;
363361

364362
@With(AccessLevel.NONE)
@@ -780,6 +778,7 @@ class Parameterized extends FullyQualified {
780778
@With
781779
@Nullable
782780
@NonFinal
781+
@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
783782
Integer managedReference;
784783

785784
@With
@@ -926,6 +925,7 @@ class GenericTypeVariable implements JavaType {
926925
@Getter
927926
@Nullable
928927
@NonFinal
928+
@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
929929
Integer managedReference;
930930

931931
@With
@@ -1020,6 +1020,7 @@ class Array implements JavaType {
10201020
@Getter
10211021
@Nullable
10221022
@NonFinal
1023+
@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
10231024
Integer managedReference;
10241025

10251026
@NonFinal
@@ -1227,6 +1228,7 @@ class Method implements JavaType {
12271228
@With
12281229
@Nullable
12291230
@NonFinal
1231+
@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
12301232
Integer managedReference;
12311233

12321234
@With(AccessLevel.PRIVATE)
@@ -1578,6 +1580,7 @@ class Variable implements JavaType {
15781580
@With
15791581
@Nullable
15801582
@NonFinal
1583+
@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
15811584
Integer managedReference;
15821585

15831586
@With(AccessLevel.PRIVATE)

rewrite-maven/src/main/java/org/openrewrite/maven/tree/MavenResolutionResult.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
package org.openrewrite.maven.tree;
1717

1818
import com.fasterxml.jackson.annotation.JsonCreator;
19+
import com.fasterxml.jackson.annotation.JsonProperty;
1920
import lombok.*;
2021
import lombok.experimental.FieldDefaults;
2122
import org.jspecify.annotations.Nullable;
@@ -46,6 +47,7 @@ public class MavenResolutionResult implements Marker {
4647
UUID id;
4748

4849
@Nullable
50+
@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
4951
Integer managedReference;
5052

5153
@With

0 commit comments

Comments
 (0)