From 6f204d98c450092f4a6252677fc44657704b9897 Mon Sep 17 00:00:00 2001 From: Rawi01 Date: Mon, 13 Mar 2023 19:55:52 +0100 Subject: [fixes #3366] Handle @NonNull type annotations on record components --- .../resource/after-ecj/NonNullOnRecordSimple.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 test/transform/resource/after-ecj/NonNullOnRecordSimple.java (limited to 'test/transform/resource/after-ecj/NonNullOnRecordSimple.java') 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; + } +} -- cgit