Bug 43972 - Static crosscutting makes interfaces unusable for javac
Summary: Static crosscutting makes interfaces unusable for javac
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.1.1   Edit
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: 1.2   Edit
Assignee: Jim Hugunin CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 50939 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-10-01 04:49 EDT by Eric Jain CLA
Modified: 2004-01-30 12:54 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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. ***