Project: AspectJ
Bug 80249 Order of types passed to compiler determines weaving behavior
Reported: 2004-12-06 05:20:15 | Status: resolved fixed

Currently, the order in which you specify types when passing them to the compiler can affect how they are woven: For example, if we have class A and class B extends A - Also, an aspect that 'declare parents: A+ implements Serializable' then depending on whether we see A first, we may or may not make B serializable. The fix is that when we weave a type, we first weave its supertype then its superinterfaces (if they were also passed to the compiler). The problematic construct is declare parents - so we only process the types in a special order if there are declare parents around. Also, because we can't currently do decp when binary weaving, the order processing logic is only being put into the source weaving pipeline.

Files changed in fix:
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java tests/decp/A.java tests/decp/AspectX.java tests/decp/B.java tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java