mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-16 08:15:19 +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,16 @@
|
||||
// version 19:
|
||||
import lombok.NonNull;
|
||||
public record NonNullOnRecordExistingSetter(String a) {
|
||||
/* Implicit */ private final String a;
|
||||
public NonNullOnRecordExistingSetter(String a) {
|
||||
super();
|
||||
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";
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user