Bug 43972

Summary: Static crosscutting makes interfaces unusable for javac
Product: [Tools] AspectJ Reporter: Eric Jain <eric.jain>
Component: CompilerAssignee: Jim Hugunin <jim-aj>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2 CC: koen.casier
Version: 1.1.1   
Target Milestone: 1.2   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Eric Jain CLA 2003-10-01 04:49:12 EDT
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?
Comment 1 Wes Isberg CLA 2003-10-01 11:57:57 EDT
See test tests/bugs/interfaceDefinition
Comment 2 Jim Hugunin CLA 2004-01-14 06:36:06 EST
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.
Comment 3 Jim Hugunin CLA 2004-01-30 12:54:12 EST
*** Bug 50939 has been marked as a duplicate of this bug. ***