[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Issues with @DeclareParents and @DeclareMixin

Two bugs raised against AJ now

@DeclareMixin issues: https://bugs.eclipse.org/bugs/show_bug.cgi?id=280651
@DeclareParents issues: https://bugs.eclipse.org/bugs/show_bug.cgi?id=280658

The former is higher priority because I consider @DeclareParents
deprecated in favour of DeclareMixin.


2009/6/17 Andy Clement <andrew.clement@xxxxxxxxx>:
> 2009/6/17 Dunstan, Tom (SACE Board) <TomD@xxxxxxxxxxxxxxxxxxx>
>> Just for fun, I then uninstalled the AJDT and installed the dev version
>> 2.0.0.e34x-20090616-1700 which bundles AspectJ version:
>> Both aspects apply fine to classes in the same
>> project. When trying to apply them to my client project, the ParentsAspect
>> does the same thing as 1.6.4, but the MixinAspect causes an AspectJ Internal
>> Compiler Error:
>> java.lang.NullPointerException
>> at
>> org.aspectj.asm.internal.ProgramElement.addChild(ProgramElement.java:398)
>> at
>> org.aspectj.weaver.model.AsmRelationshipProvider.addChildNodes(AsmRelationshipProvider.java:611)
>> at
>> org.aspectj.weaver.model.AsmRelationshipProvider.createHierarchy(AsmRelationshipProvider.java:425)
>> at
>> org.aspectj.weaver.model.AsmRelationshipProvider.addRelationship(AsmRelationshipProvider.java:121)
>> at org.aspectj.weaver.bcel.B ... OKEINTERFACE java.lang.Runnable.run ()V
>>                    RETURN   (line 17)
>>  end public static void main(String[])
>> end public class ctest.Foo
> The @DeclareMixin has had basic testing, but looks like you found a bug with
> it - i'll fix this today (if I can recreate it).  I kind of see
> @DeclareMixin as a replacement for @DeclareParents as it offers a nicer more
> flexible syntax - so I'd prefer it that approach was used moving forward.
> Do you have a preference?
> Andy