[hibernate-issues] [Hibernate-JIRA] Resolved: (HV-149) ReflectionHelper.containsMethod ignores "is" methods

Emmanuel Bernard (JIRA) noreply at atlassian.com
Mon May 4 11:35:17 EDT 2009


     [ http://opensource.atlassian.com/projects/hibernate/browse/HV-149?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Bernard resolved HV-149.
---------------------------------

       Resolution: Fixed
    Fix Version/s: 4.0.0.Beta2

Thanks for the issue.
Fixed and optimized AFAIK, can you check out trunk if you have a chance.

> ReflectionHelper.containsMethod ignores "is" methods
> ----------------------------------------------------
>
>                 Key: HV-149
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-149
>             Project: Hibernate Validator
>          Issue Type: Bug
>    Affects Versions: 4.0.0.Beta1
>            Reporter: Juergen Zimmermann
>             Fix For: 4.0.0.Beta2
>
>
> Line 399 of ReflectionHelper looks as follows:
> clazz.getMethod( "get" + methodName.substring( 0, 1 ).toUpperCase() + methodName.substring( 1 ) );
> However, if you have a boolean property, then the get method requires the prefix "is", e.g.
> private boolean female;
> public boolean isFemale() { return female; }  // prefix "is", not "get"
> public void setFemale(boolean female) { this.female = female;  }
> This handling is important for methods being annotated with @AssertTrue and @AssertFalse

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