// version 14: import lombok.NonNull; public record NonNullOnRecord(String a, String b) { /* Implicit */ private final String a; /* Implicit */ private final String b; public @java.lang.SuppressWarnings("all") NonNullOnRecord(@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; } }