[hibernate-issues] [Hibernate-JIRA] Commented: (HV-521) TypeDescriptor#getConstraintsForMethod() should return null for unconstrained methods

Gunnar Morling (JIRA) noreply at atlassian.com
Sun Feb 19 03:40:12 EST 2012


    [ https://hibernate.onjira.com/browse/HV-521?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45543#comment-45543 ] 

Gunnar Morling commented on HV-521:
-----------------------------------

I think this depends on how we proceed with the HV-proprietary method validation API in HV 5.

IMO we should get rid of the proprietary API altogether then as it is superseded by the standard BV API. So if we want to address this issue to fix the proprietary API we should do it in HV 4.3. But as this might break clients and the behavior will be corrected in the BV API anyways, I'd prefer to leave everything as is, in order to reduce the number of changes in the public API. This issue is also no big problem but more of an inconsistency.

If we agree to go down that route, I'll close the issue as {{obsolete}}.

> TypeDescriptor#getConstraintsForMethod() should return null for unconstrained methods
> -------------------------------------------------------------------------------------
>
>                 Key: HV-521
>                 URL: https://hibernate.onjira.com/browse/HV-521
>             Project: Hibernate Validator
>          Issue Type: Improvement
>          Components: engine
>            Reporter: Gunnar Morling
>             Fix For: 4.3.0.Alpha1
>
>
> The method {{TypeDescriptor#getConstraintsForMethod()}} always returns a {{MethodDescriptor}}, also if the specified method is actually unconstrained. This differs from the behavior of {{BeanDescriptor#getConstraintsForProperty()}} which returns {{null}} if the specified property has no constraints.
> This change might break clients relying on the current behavior, but nevertheless we should change this IMO better earlier than later.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list