[hibernate-issues] [Hibernate-JIRA] Created: (BVAL-221) The constraint violation builder cannot put constraint on a top level map key

Emmanuel Bernard (JIRA) noreply at atlassian.com
Thu Mar 10 08:32:08 EST 2011


The constraint violation builder cannot put constraint on a top level map key
-----------------------------------------------------------------------------

                 Key: BVAL-221
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/BVAL-221
             Project: Bean Validation
          Issue Type: Bug
          Components: spec-general
            Reporter: Emmanuel Bernard
             Fix For: 1.1


>From Logan
This is a minor thing and maybe tunnel-visioned (I don't know much about the other beans-related specs), but if I do something like this in a ConstraintValidator:

{code}
  public boolean isValid(Map<String, String> target, ConstraintValidatorContext context) {
    context.buildConstraintViolationWithTemplate("oh noes")
                        .addNode(somekey)
                        .addConstraintViolation();
    return false;
  }
{code}


It would be nice if that resulted in a violation at path someobject.mapproperty[somekey] rather than someobject.mapproperty.somekey.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list