Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] NullPointerException

This is a great bug report.  It contains a small self-contained test case with clear instructions for how to reproduce it.  The best way to be sure this is resolved in a future AspectJ release is to submit it to the bug report system.  If you find any bugs, please submit a reproducible test case (just like this one) to https://dev.eclipse.org (-> Bug Reports) (product AspectJ, component Compiler).

Thanks - Jim

> -----Original Message-----
> From: NAKAGUCHI Takao [mailto:takao-n@xxxxxxxxxxxxxxx]
> Sent: Sunday, June 29, 2003 1:53 AM
> To: aspectj-users@xxxxxxxxxxx
> Subject: [aspectj-users] NullPointerException
> 
> I got NullPointerException when
> 
> . placing abstract aspcet(1) that has abstract pointcut and advice in jar
> file
> . overriding abstract pointcut using the joinpoint that has cflow in the
> aspect(2)
> 
> here is the part of stack trace:
> [iajc] java.lang.NullPointerException
> [iajc]  at
> org.aspectj.weaver.patterns.CflowPointcut.concretize1(CflowPointcut.java:1
> 26)
> [iajc]  at
> org.aspectj.weaver.patterns.AndPointcut.concretize1(AndPointcut.java:88)
> [iajc]  at
> org.aspectj.weaver.patterns.ReferencePointcut.concretize1(ReferencePointcu
> t.java:270)
> [iajc]  at
> org.aspectj.weaver.patterns.Pointcut.concretize(Pointcut.java:127)
> 
> -- (1) AbstractAspect.aj --
> public abstract aspect AbstractAspect{
>   public abstract pointcut directCall();
>   before(): directCall(){
>     System.out.println("direct");
>   }
> }
> 
> -- TestAspect.aj --
> public aspect TestAspect extends AbstractAspect{
>   public pointcut directCall():
>     execution(void Test.doSayHello(..))
>     && cflow(execution(void Test.direct(..)))
>   ;
> }
> 
> -- Test.java --
> public class Test{
>   public static void main(String[] arguments){
>     Test test = new Test();
>     test.sayHello();
>     test.doSayHello();
>   }
> 
>   public void sayHello(){
>     doSayHello();
>   }
> 
>   public void doSayHello(){
>     System.out.println("hello.");
>   }
> }
> 
> -- a part of build.xml --
>   <target name="compile" depends="distabstractaspect">
>     <iajc
>       srcdir="src"
>       destDir="${build}"
>       classpath="aspectjrt.jar"
>       aspectPath="${dist}/abstractaspect.jar"
>     />
>   </target>
> 
> ----
> 
> When not placing aspect(1) in jar or not using cflow in the aspect(2),
> I didn't get NullPointerException.
> I used JDK1.4.1_02 on Windows2000(ja) system.
> 
> 
> NAKAGUCHI Takao
> takao-n@xxxxxxxxxxxxxxx
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/aspectj-users


Back to the top