From 64ad53cbc68b1fbbb6958fdc23abf5e7e2e14147 Mon Sep 17 00:00:00 2001 From: "Tobias Burdow [Kaleidox]" Date: Wed, 17 Jan 2024 09:50:20 +0100 Subject: [PATCH] Add NonNull annotations to test cases for testing annotation copying --- test/transform/resource/after-delombok/DataPlain.java | 5 +++-- test/transform/resource/after-delombok/ValuePlain.java | 4 +++- test/transform/resource/before/DataPlain.java | 2 +- test/transform/resource/before/ValuePlain.java | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/test/transform/resource/after-delombok/DataPlain.java b/test/transform/resource/after-delombok/DataPlain.java index 15b834d9c3..bf64415844 100644 --- a/test/transform/resource/after-delombok/DataPlain.java +++ b/test/transform/resource/after-delombok/DataPlain.java @@ -1,6 +1,6 @@ class Data1 { final int x; - String name; + @lombok.NonNull String name; @java.lang.SuppressWarnings("all") public Data1(final int x) { this.x = x; @@ -9,12 +9,13 @@ public Data1(final int x) { public int getX() { return this.x; } + @lombok.NonNull @java.lang.SuppressWarnings("all") public String getName() { return this.name; } @java.lang.SuppressWarnings("all") - public void setName(final String name) { + public void setName(@lombok.NonNull final String name) { this.name = name; } @java.lang.Override diff --git a/test/transform/resource/after-delombok/ValuePlain.java b/test/transform/resource/after-delombok/ValuePlain.java index cf2c1142c3..d2d821110b 100644 --- a/test/transform/resource/after-delombok/ValuePlain.java +++ b/test/transform/resource/after-delombok/ValuePlain.java @@ -1,8 +1,9 @@ final class Value1 { private final int x; + @lombok.NonNull private final String name; @java.lang.SuppressWarnings("all") - public Value1(final int x, final String name) { + public Value1(final int x, @lombok.NonNull final String name) { this.x = x; this.name = name; } @@ -10,6 +11,7 @@ public Value1(final int x, final String name) { public int getX() { return this.x; } + @lombok.NonNull @java.lang.SuppressWarnings("all") public String getName() { return this.name; diff --git a/test/transform/resource/before/DataPlain.java b/test/transform/resource/before/DataPlain.java index e7e3da1135..13998e96c8 100644 --- a/test/transform/resource/before/DataPlain.java +++ b/test/transform/resource/before/DataPlain.java @@ -1,7 +1,7 @@ import lombok.Data; @lombok.Data class Data1 { final int x; - String name; + @lombok.NonNull String name; } @Data class Data2 { final int x; diff --git a/test/transform/resource/before/ValuePlain.java b/test/transform/resource/before/ValuePlain.java index 3fe33705d2..a1e122f604 100644 --- a/test/transform/resource/before/ValuePlain.java +++ b/test/transform/resource/before/ValuePlain.java @@ -1,7 +1,7 @@ import lombok.Value; @lombok.Value class Value1 { final int x; - String name; + @lombok.NonNull String name; } @Value @lombok.experimental.NonFinal class Value2 { public int x;