I am using javax.validation.constraints.NotNull in one of the POJO as follows:
public class Abc {
@NotNull
private final String x;
@NotNull
private final String y;
}
And then even when I make the object of Abc with null values for both the fields, it doesn't throw any exception. Any idea why?
Eg.
Abc abc = new Abc(null, null);
doesn't throw any exception.