Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Null static part of the thisJoinPoint

Hi,

I am getting a NullPointerException in my advice code. the thisJoinPoint is not null, a call to thisJoinPoint.getStaticPart() returns null.

Here is a stripped down version of the aspect I used:

public aspect BaseAspect { pointcut methodExec():
 pointcut myTrace(): within(BaseAspect);
 pointcut javaCode(): within(java..*) || call(* java..*(..));
 pointcut methodExec():
        execution(* net.sf.jode..*(..))
         && !javaCode()
         && !myTrace()
         && !execution(public static void *..main(String []));

   after () returning (Object t): methodExec() {
     thisJoinPoint.getSignature();
   }
}

and here is the stack dump:


java.lang.NullPointerException
at org.aspectj.runtime.reflect.JoinPointImpl.getSignature(JoinPointImpl.java:70)
       at BaseAspect.ajc$afterReturning$BaseAspect$600(BaseAspect.java:50)
       at net.sf.jode.expr.NoArgOperator.updateSubTypes(Unknown Source)
       at net.sf.jode.expr.Operator.initOperands(Unknown Source)
       at net.sf.jode.expr.NoArgOperator.<init>(Unknown Source)
       at net.sf.jode.expr.NoArgOperator.<init>(Unknown Source)
       at net.sf.jode.expr.ConstOperator.<init>(Unknown Source)
       at net.sf.jode.expr.Expression.<clinit>(Unknown Source)
       at net.sf.jode.decompiler.MethodAnalyzer.analyze(Unknown Source)
       at net.sf.jode.decompiler.ClassAnalyzer.analyze(Unknown Source)
       at net.sf.jode.decompiler.ClassAnalyzer.dumpJavaFile(Unknown Source)
       at net.sf.jode.decompiler.ClassAnalyzer.dumpJavaFile(Unknown Source)
       at net.sf.jode.decompiler.Main.decompileClass(Unknown Source)
       at net.sf.jode.decompiler.Main.decompile(Unknown Source)
       at net.sf.jode.decompiler.Main.main(Unknown Source)




Back to the top