SpEL correctly handles "is" accessors with Boolean return type

Issue: SPR-10091
This commit is contained in:
Juergen Hoeller
2012-12-13 11:28:06 +01:00
parent 12c4f8e7f9
commit 8abe1f055e

View File

@@ -325,7 +325,7 @@ public class ReflectivePropertyAccessor implements PropertyAccessor {
getterName = "is" + StringUtils.capitalize(propertyName);
for (Method method : ms) {
if (!method.isBridge() && method.getName().equals(getterName) && method.getParameterTypes().length == 0 &&
boolean.class.equals(method.getReturnType()) &&
(boolean.class.equals(method.getReturnType()) || Boolean.class.equals(method.getReturnType())) &&
(!mustBeStatic || Modifier.isStatic(method.getModifiers()))) {
return method;
}