Skip to content

Commit 8abe1f0

Browse files
committed
SpEL correctly handles "is" accessors with Boolean return type
Issue: SPR-10091
1 parent 12c4f8e commit 8abe1f0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

org.springframework.expression/src/main/java/org/springframework/expression/spel/support/ReflectivePropertyAccessor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ protected Method findGetterForProperty(String propertyName, Class<?> clazz, bool
325325
getterName = "is" + StringUtils.capitalize(propertyName);
326326
for (Method method : ms) {
327327
if (!method.isBridge() && method.getName().equals(getterName) && method.getParameterTypes().length == 0 &&
328-
boolean.class.equals(method.getReturnType()) &&
328+
(boolean.class.equals(method.getReturnType()) || Boolean.class.equals(method.getReturnType())) &&
329329
(!mustBeStatic || Modifier.isStatic(method.getModifiers()))) {
330330
return method;
331331
}

0 commit comments

Comments
 (0)