mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-15 16:14:46 +00:00
[fixes #3366] Handle @NonNull type annotations on record components
This commit is contained in:
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;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user