Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] NullPointerException in org.aspectj.weaver.ReferenceType.makeDeclaredSignature

Hi
I have a null pointeur exception at org.aspectj.weaver.ReferenceType.makeDeclaredSignature. The referenceType has no genericType and no typeParameters.

I attached a eclipse project eclipses which shows the problem with apectj. The problem comes that there is a generic interface and a non generic interface.

This sample pattern is :

interface I {
}

interface IE1<T> {

}

interface IE2 {

}

aspect A1 {
       declare parents : I implements  IE1<String>;
}

aspect A2 {
       declare parents : I implements  IE2;
}

A first solution is to add a test to the beginning of method getSignatureForAttribute before the call of makeDeclaredSignature.

   public String getSignatureForAttribute() {
       if (genericType == null || typeParameters == null)
           return this.getSignature();
return makeDeclaredSignature(genericType,typeParameters); }

I think it resolve my problem.
Thanks.


Attachment: test.zip
Description: Zip archive

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


Back to the top