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
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira