Gunnar Morling commented on Improvement BVAL-191

Maybe addBeanNode() could also be called on the parent object like this:

constraintValidatorContext 
    .buildConstraintViolationWithTemplate("constraints.CompatiblePersons.gender.message") 
        .addBeanNode("persons") 
        .inIterable()
        .atIndex(0) 
        .addConstraintViolation();

This would add two nodes, one for the traversed property and one for the type hosting the class-level constraint.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira