Bug 35865 - No weaving when introduction to compiled class (in jar) is made - compiler bug
Summary: No weaving when introduction to compiled class (in jar) is made - compiler bug
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 2000
: P2 major (vote)
Target Milestone: ---   Edit
Assignee: Jim Hugunin CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-31 05:53 EST by Pawel Slowikowski CLA
Modified: 2003-04-10 20:42 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pawel Slowikowski CLA 2003-03-31 05:53:50 EST
I use aspectj 1.1 rc1
I have:

in a directory java

public class C
{
}

public interface I
{
}

and in a directory aspects

public aspect A
{
 declare parents: C implements I;
}

if i compile sources with:

<iajc outjar="a.jar" classpath="${aspectjrt.jar}" verbose="off">
  <sourceRoots>
    <pathelement path="java" />
    <pathelement path="aspects" />
  </sourceRoots>
</iajc>

everything is ok but if i use (intoduction to a compiled class in a
jar-file):

<javac srcdir="java" destdir="classes" debug="on" optimize="off"
deprecation="off" />
<jar jarfile="c.jar" basedir="classes" />
<iajc outjar="a.jar" injars="c.jar" classpath="${aspectjrt.jar}"
verbose="off">
  <sourceRoots>
    <pathelement path="aspects" />
  </sourceRoots>
</iajc>

the class C doesn't implement the interface I.
Comment 1 Jim Hugunin CLA 2003-04-10 14:18:51 EDT
Changing priority to make sure this is addressed in the next release.
Comment 2 Jim Hugunin CLA 2003-04-10 20:42:37 EDT
this is now fixed in the current tree with a test in options/injars
In 1.1 this will only work for interface parents.  A compiler limitation error
is reported if declare parents is used to change a superclass when only the 
binary form is around.  This would require a lot more analysis to support
properly.