[hibernate-issues] [Hibernate-JIRA] Commented: (HV-134) Built-in constraint parameter validation

Emmanuel Bernard (JIRA) noreply at atlassian.com
Thu Jul 2 09:31:15 EDT 2009


    [ http://opensource.atlassian.com/projects/hibernate/browse/HV-134?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33514#action_33514 ] 

Emmanuel Bernard commented on HV-134:
-------------------------------------

We can discuss that by IM but I don't think forcing a Bean Validation exception is the right thing. As a matter of fact, the spec says that every exception raised by the CV implementation will be wrapped into a ValidationException. It would be more meaningful to return an IAE in this case.

> Built-in constraint parameter validation
> ----------------------------------------
>
>                 Key: HV-134
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-134
>             Project: Hibernate Validator
>          Issue Type: Bug
>          Components: validators
>    Affects Versions: 4.0.0.Alpha3
>            Reporter: Emmanuel Bernard
>
> When params are invalid (ie max < min), the ConstraintValidator raises a ValidationException.
> While not wrong from a spec POV, I don't think the impl has to use VE. It probably amkes more sense to use IllegalArgumentException

-- 
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