aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/after-ecj/NonNullOnRecordSimple.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-ecj/NonNullOnRecordSimple.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-ecj/NonNullOnRecordSimple.java')
-rw-r--r--test/transform/resource/after-ecj/NonNullOnRecordSimple.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/transform/resource/after-ecj/NonNullOnRecordSimple.java b/test/transform/resource/after-ecj/NonNullOnRecordSimple.java
new file mode 100644
index 00000000..ee1510ea
--- /dev/null
+++ b/test/transform/resource/after-ecj/NonNullOnRecordSimple.java
@@ -0,0 +1,19 @@
+// version 14:
+import lombok.NonNull;
+public record NonNullOnRecordSimple(String a, String b) {
+/* Implicit */ private final String a;
+/* Implicit */ private final String b;
+ public @java.lang.SuppressWarnings("all") NonNullOnRecordSimple(@NonNull String a, @NonNull String b) {
+ super();
+ if ((a == null))
+ {
+ throw new java.lang.NullPointerException("a is marked non-null but is null");
+ }
+ if ((b == null))
+ {
+ throw new java.lang.NullPointerException("b is marked non-null but is null");
+ }
+ this.a = a;
+ this.b = b;
+ }
+}