el-spec icon indicating copy to clipboard operation
el-spec copied to clipboard

MethodExpression.getMethodInfo() always returns null

Open glassfishrobot opened this issue 12 years ago • 2 comments

When invoking getMethodInfo() on a method expression, I always get null.

This seems to be caused by AstValue.getMethodInfo():

public MethodInfo getMethodInfo(EvaluationContext ctx, Class[] paramTypes)
            throws ELException {
        Target t = getTarget(ctx);
        if (t.isMethodCall()) {
            return null;
        }
        Object property = t.suffixNode.getValue(ctx);
        Method m = ReflectionUtil.getMethod(t.base, property, paramTypes);
        return new MethodInfo(m.getName(), m.getReturnType(), m
.getParameterTypes());
    }

Shouldn't this be

if ( ! t.isMethodCall()) {
    return null;
}

Environment

javax.el-3.0.0.jar standalone, Oracle Java 1.7.0_45 on Linux 64-bit

glassfishrobot avatar Dec 12 '13 09:12 glassfishrobot

Reported by hwellmann

glassfishrobot avatar Dec 12 '13 09:12 glassfishrobot

This issue was imported from java.net JIRA EL_SPEC-17

glassfishrobot avatar Apr 24 '17 07:04 glassfishrobot