]
Juergen Zimmermann commented on HV-149:
---------------------------------------
I checked out trunk: the "is" methods are recognized! Thanks for the immediate
response.
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: