[fixes #3366] Handle @NonNull type annotations on record components

This commit is contained in:
Rawi01 authored and Roel Spilker committed 2023-03-21 17:13:54 +01:00
1 parent 13642eb896
commit 6f204d98c4
17 files changed
+110 -81

No files matched your search

@@ -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;
}
}