Class<?> clazz = base.getClass();
if (paramTypes != null) {
try {
- matchingMethod = clazz.getMethod(methodName, paramTypes);
+ matchingMethod =
+ getMethod(clazz, clazz.getMethod(methodName, paramTypes));
} catch (NoSuchMethodException e) {
throw new MethodNotFoundException(e);
}
if (methodName.equals(m.getName()) &&
m.getParameterTypes().length == paramCount) {
// Same number of parameters - use the first match
- matchingMethod = m;
+ matchingMethod = getMethod(clazz, m);
break;
}
if (m.isVarArgs()) {
- matchingMethod = m;
+ matchingMethod = getMethod(clazz, m);
}
}
if (matchingMethod == null) {
context.getVariableMapper().setVariable("beanA", var);
ValueExpression ve = factory.createValueExpression(
- context, "${beanA.valList.isEmpty()}", String.class);
+ context, "${beanA.valList.size()}", Integer.class);
- String result = (String) ve.getValue(context);
- assertEquals("true", result);
+ Integer result = (Integer) ve.getValue(context);
+ assertEquals(Integer.valueOf(0), result);
}
context.getVariableMapper().setVariable("list", var);
ValueExpression ve = factory.createValueExpression(
- context, "${list.isEmpty()}", Boolean.class);
+ context, "${list.size()}", Integer.class);
- Boolean result = (Boolean) ve.getValue(context);
- assertEquals(Boolean.TRUE, result);
+ Integer result = (Integer) ve.getValue(context);
+ assertEquals(Integer.valueOf(0), result);
}
}
<bug>51532</bug>: JSP files with dependencies in JARs were recompiled on
every access leading to poor performance. (markt)
</fix>
+ <fix>
+ <bug>51544</bug>: Correctly resolve bean methods in EL so accessible
+ methods that are overridden by inaccessible methods do not cause an
+ IllegalAccessException. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Web applications">