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
精彩评论