Community
Participate
Working Groups
ClassFormatError when running something like the following (actual is in tests/new/EmptyInterface.java): --------- EmptyInterface.java public class EmptyInterface { public static void main(String[] args) { new C().go(); // at least constructor and method execution if (2 > Log.hits) { System.err.println("fail: " + Log.log); } } } aspect Log { static int hits; static StringBuffer log = new StringBuffer(); interface LoggedType {} declare parents: C implements LoggedType; void around() : within(LoggedType+) && !initialization(new(..)) && !preinitialization(new(..)) { hits++; log.append(thisJoinPoint + ";"); } } class C { void go() {} }
Raising the severity because this is a common idiom and raising the priority because this has a test case in the suite.
As in AspectJ-1.0, we still can't correctly implement around advice on the staticinitializer of an interface. The bug in 1.1rc1 is that we were generating invalid bytecode rather than signalling the limitation. This has been fixed in the tree, and the test expanded to check that non- around advice works in this situation and that around advice will produce a compiler error.