Library could support compact constructors in java records:
record Foo(String name, int x, int y) {
Foo {
Objects.requireNonNull(name);
}
}
Currently, as a workaround you can ovveride the whole default constructor:
record Foo(String name, int x, int y) {
Foo(String name, int x, int y) {
this.name = Objects.requireNonNull(name);
this.x = x;
this.y = y;
}
}