aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/after-delombok/NonNullOnRecordExistingSetter.java
diff options
context:
space:
mode:
authorRawi01 <Rawi01@users.noreply.github.com>2023-03-13 19:55:52 +0100
committerRoel Spilker <r.spilker@gmail.com>2023-03-21 17:13:54 +0100
commit6f204d98c450092f4a6252677fc44657704b9897 (patch)
treec315d0a55aa93f0fb399c776574a937acebce8ba /test/transform/resource/after-delombok/NonNullOnRecordExistingSetter.java
parent13642eb896ae6dbbaebab6df3c3758296102ead8 (diff)
downloadlombok-6f204d98c450092f4a6252677fc44657704b9897.tar.gz
lombok-6f204d98c450092f4a6252677fc44657704b9897.tar.bz2
lombok-6f204d98c450092f4a6252677fc44657704b9897.zip
[fixes #3366] Handle @NonNull type annotations on record components
Diffstat (limited to 'test/transform/resource/after-delombok/NonNullOnRecordExistingSetter.java')
-rw-r--r--test/transform/resource/after-delombok/NonNullOnRecordExistingSetter.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/transform/resource/after-delombok/NonNullOnRecordExistingSetter.java b/test/transform/resource/after-delombok/NonNullOnRecordExistingSetter.java
new file mode 100644
index 00000000..11aaca49
--- /dev/null
+++ b/test/transform/resource/after-delombok/NonNullOnRecordExistingSetter.java
@@ -0,0 +1,13 @@
+// version 14:
+import lombok.NonNull;
+public record NonNullOnRecordExistingSetter(@NonNull String a) {
+ public NonNullOnRecordExistingSetter(String a) {
+ this.a = a;
+ }
+ public void method(@NonNull String param) {
+ if (param == null) {
+ throw new java.lang.NullPointerException("param is marked non-null but is null");
+ }
+ String asd = "a";
+ }
+}