record Point(int x, int y) {
public Point {} // could be removed
}
record Point(int x, int y) {
public Point(int x, int y) { // could be removed
this.x = x;
this.y = y;
}
}
// could be converted to compact constructor
record Range(int from, int to) {
public Range(int from, int to) {
if (from > to) throw new IllegalArgumentException();
this.from = from;
this.to = to;
}
}
This inspection only reports if the configured language level is 14 Preview.
New in 2020.1