modifiers of default methods
Stephan Herrmann
stephan at cs.tu-berlin.de
Wed Oct 3 18:34:51 PDT 2012
Hi,
Using jdk1.8.0-lambda-8-b56 I can compile the following
public interface I {
strictfp synchronized void foo() default {}
}
public class C implements I {
public static void main (String[] args) {
System.out.println("Hi");
}
}
but any attempt to run the resulting class files gives:
Exception in thread "main" java.lang.ClassFormatError: Method foo in
class I has illegal modifiers: 0x821
Does the VM require bit AccDefaultMethod to be set (I haven't yet
seen a specification of that flag), or is the VM simply not updated
to accept the newly legal combination of modifiers?
best,
Stephan
More information about the lambda-dev
mailing list