1 2 3 4 5 6 7 8 9 10
// version 16: import lombok.NonNull; record NonNullOnRecord2(@NonNull String a) { public NonNullOnRecord2 { if (a == null) { throw new java.lang.NullPointerException("a is marked non-null but is null"); } System.out.println("Hello"); } }