Community
Participate
Working Groups
When adding default implementations to an existing interface, the AspectJ compiler seems to modify the interface itself, rather than only modifying classes that were declared to implement this interface with something like 'declare parents: A implements X'. When viewed with Eclipse's class file viewer, all methods have the following data attached: Attribute: Name: Synthetic Length: 0 Both Eclipse and plain javac would then complain if I used any of these methods, as if they were made invisible. I have no idea what is going on here, but one workaround I found is to simply not advise the original interface, but create a second, hidden interface that extends the original interface, and advise that instead. Does this really have to be this way?
See test tests/bugs/interfaceDefinition
Fixed based on patch from George Harley. The fix is not to put the Synthetic attribute on these generated methods so that they can be seen by standard Java compilers.
*** Bug 50939 has been marked as a duplicate of this bug. ***