Validator.validateFieldValue should not return null
object validation framework for Java
Brought to you by:
sebthom
Oval v1.10
net.sf.oval.Validator.validateFieldValue
Javadoc:
...
* @return a list with the detected constraint violations. if no violations are detected an empty list is returned
* @throws ...
Code (line 1257):
if (checks == null || checks.size() == 0) return null;
Clearly, there is a contradiction.
I vote for a code change:
final List<ConstraintViolation> violations = CollectionFactoryHolder.getFactory().createList();
if (checks == null || checks.size() == 0) return violations;
Logged In: YES
user_id=341856
Originator: NO
Fixed in SVN. Thanks for reporting!