aboutsummaryrefslogtreecommitdiff
path: root/test/transform
diff options
context:
space:
mode:
authorReinier Zwitserloot <r.zwitserloot@projectlombok.org>2019-07-16 01:50:16 +0200
committerReinier Zwitserloot <r.zwitserloot@projectlombok.org>2019-07-16 01:50:16 +0200
commite1d1415d6e147edacaa50d8954737a168fbdafb5 (patch)
tree5f01ebe2092d8ebf2271beb57cba3874559e1ad1 /test/transform
parentb439e4ce771813a12300c3006f9fcc12f25678d7 (diff)
downloadlombok-e1d1415d6e147edacaa50d8954737a168fbdafb5.tar.gz
lombok-e1d1415d6e147edacaa50d8954737a168fbdafb5.tar.bz2
lombok-e1d1415d6e147edacaa50d8954737a168fbdafb5.zip
[fixes #2168] Added JsonSetter as a copyable annotation
Diffstat (limited to 'test/transform')
-rw-r--r--test/transform/resource/after-delombok/JacksonJsonProperty.java5
-rw-r--r--test/transform/resource/after-ecj/JacksonJsonProperty.java8
-rw-r--r--test/transform/resource/before/JacksonJsonProperty.java3
3 files changed, 13 insertions, 3 deletions
diff --git a/test/transform/resource/after-delombok/JacksonJsonProperty.java b/test/transform/resource/after-delombok/JacksonJsonProperty.java
index 842ba298..16a8039e 100644
--- a/test/transform/resource/after-delombok/JacksonJsonProperty.java
+++ b/test/transform/resource/after-delombok/JacksonJsonProperty.java
@@ -1,6 +1,9 @@
import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSetter;
+import com.fasterxml.jackson.annotation.Nulls;
public class JacksonJsonProperty {
@JsonProperty("kebab-case-prop")
+ @JsonSetter(nulls = Nulls.SKIP)
public String kebabCaseProp;
@java.lang.SuppressWarnings("all")
JacksonJsonProperty(final String kebabCaseProp) {
@@ -14,6 +17,7 @@ public class JacksonJsonProperty {
JacksonJsonPropertyBuilder() {
}
@JsonProperty("kebab-case-prop")
+ @JsonSetter(nulls = Nulls.SKIP)
@java.lang.SuppressWarnings("all")
public JacksonJsonPropertyBuilder kebabCaseProp(final String kebabCaseProp) {
this.kebabCaseProp = kebabCaseProp;
@@ -34,6 +38,7 @@ public class JacksonJsonProperty {
return new JacksonJsonPropertyBuilder();
}
@JsonProperty("kebab-case-prop")
+ @JsonSetter(nulls = Nulls.SKIP)
@java.lang.SuppressWarnings("all")
public void setKebabCaseProp(final String kebabCaseProp) {
this.kebabCaseProp = kebabCaseProp;
diff --git a/test/transform/resource/after-ecj/JacksonJsonProperty.java b/test/transform/resource/after-ecj/JacksonJsonProperty.java
index 73049b2a..c0485251 100644
--- a/test/transform/resource/after-ecj/JacksonJsonProperty.java
+++ b/test/transform/resource/after-ecj/JacksonJsonProperty.java
@@ -1,4 +1,6 @@
import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSetter;
+import com.fasterxml.jackson.annotation.Nulls;
import lombok.Builder;
import lombok.Setter;
public @Builder class JacksonJsonProperty {
@@ -7,7 +9,7 @@ public @Builder class JacksonJsonProperty {
@java.lang.SuppressWarnings("all") JacksonJsonPropertyBuilder() {
super();
}
- public @JsonProperty("kebab-case-prop") @java.lang.SuppressWarnings("all") JacksonJsonPropertyBuilder kebabCaseProp(final String kebabCaseProp) {
+ public @JsonProperty("kebab-case-prop") @JsonSetter(nulls = Nulls.SKIP) @java.lang.SuppressWarnings("all") JacksonJsonPropertyBuilder kebabCaseProp(final String kebabCaseProp) {
this.kebabCaseProp = kebabCaseProp;
return this;
}
@@ -18,7 +20,7 @@ public @Builder class JacksonJsonProperty {
return (("JacksonJsonProperty.JacksonJsonPropertyBuilder(kebabCaseProp=" + this.kebabCaseProp) + ")");
}
}
- public @JsonProperty("kebab-case-prop") @Setter String kebabCaseProp;
+ public @JsonProperty("kebab-case-prop") @JsonSetter(nulls = Nulls.SKIP) @Setter String kebabCaseProp;
@java.lang.SuppressWarnings("all") JacksonJsonProperty(final String kebabCaseProp) {
super();
this.kebabCaseProp = kebabCaseProp;
@@ -26,7 +28,7 @@ public @Builder class JacksonJsonProperty {
public static @java.lang.SuppressWarnings("all") JacksonJsonPropertyBuilder builder() {
return new JacksonJsonPropertyBuilder();
}
- public @JsonProperty("kebab-case-prop") @java.lang.SuppressWarnings("all") void setKebabCaseProp(final String kebabCaseProp) {
+ public @JsonProperty("kebab-case-prop") @JsonSetter(nulls = Nulls.SKIP) @java.lang.SuppressWarnings("all") void setKebabCaseProp(final String kebabCaseProp) {
this.kebabCaseProp = kebabCaseProp;
}
} \ No newline at end of file
diff --git a/test/transform/resource/before/JacksonJsonProperty.java b/test/transform/resource/before/JacksonJsonProperty.java
index f002dc48..f0b7b2f2 100644
--- a/test/transform/resource/before/JacksonJsonProperty.java
+++ b/test/transform/resource/before/JacksonJsonProperty.java
@@ -1,10 +1,13 @@
import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSetter;
+import com.fasterxml.jackson.annotation.Nulls;
import lombok.Builder;
import lombok.Setter;
@Builder
public class JacksonJsonProperty {
@JsonProperty("kebab-case-prop")
+ @JsonSetter(nulls = Nulls.SKIP)
@Setter
public String kebabCaseProp;
}