0

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 concrete classes in 2.9.0-1 but not 2.8.1

Community
  • 1
  • 1
andreak
  • 902
  • 7
  • 10
  • See this: http://stackoverflow.com/questions/8748625/why-are-concrete-function-implementations-in-traits-compiled-to-bridge-methods-i – Janx Jan 05 '12 at 21:37
  • Thanks for the info, good to see the old behavior is back in newer releases. – andreak Jan 09 '12 at 09:45

0 Answers0