开发者

Why does OGNL ignore synthetic and volatile methods?

In OgnlRuntime we have:

static boolean isMethodCallable(Method m)
{
    if ((isJdk15() && m.isSynthetic()) || Modifier.isVolatile(m.getModifiers()))
        return false;

    return true;
}

Which get called in getDeclaredMethods() and the method is skipped if isMethodCallable() returns true. This means that all methods in a scala-trait (starting from scala-2.9) never will get executed.

What is the reason behind skipping volatile (and for that matter synthetic, compiler-generated) methods?

Related question (by me): Methods in trait become volatile methods when mixed in concre开发者_Python百科te classes in 2.9.0-1 but not 2.8.1

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜