RandomData
RandomData copied to clipboard
Possible NPE in DateGenerator
Hello, the DateGenerator class would benefit from additional null check:
@Override
protected Matcher getDefaultMatcher() {
return f -> f.getName().equals("date");
}
to
@Override
protected Matcher getDefaultMatcher() {
return f -> f.getName() != null && f.getName().contains("date");
}
Currently it would crash when no RandomValue annotation is provided to some of the fields or default values are supplied in a data class constructor.