SpEL correctly handles "is" accessors with Boolean return type

Issue: SPR-10091
This commit is contained in:
Juergen Hoeller
2012-12-13 10:15:19 +01:00
parent bda07059d0
commit 431c7ff31f
2 changed files with 194 additions and 146 deletions

View File

@@ -330,7 +330,7 @@ public class ReflectivePropertyAccessor implements PropertyAccessor {
getterName = "is" + propertyWriteMethodSuffix;
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;
}