blob: dec912617196b14f2919b831186066759b036fa2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
// version 16:
import lombok.NonNull;
public record NonNullExistingConstructorOnRecord(@NonNull String a, @NonNull String b) {
@java.lang.SuppressWarnings("all")
public NonNullExistingConstructorOnRecord {
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");
}
}
public NonNullExistingConstructorOnRecord(@NonNull String b) {
this("default", b);
if (b == null) {
throw new java.lang.NullPointerException("b is marked non-null but is null");
}
}
}
|