[Bug 24] New: NPE while trying to inline pointcut

From: <abc-bugs@comlab.ox.ac.uk>
Date: Thu Sep 23 2004 - 20:27:45 BST

http://abc.comlab.ox.ac.uk/cgi-bin/bugzilla/show_bug.cgi?id=24

           Summary: NPE while trying to inline pointcut
           Product: abc
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: AspectJ compiler
        AssignedTo: abc-bugs@comlab.ox.ac.uk
        ReportedBy: olhotak@sable.mcgill.ca

In compiling atrack, I get the exception:

Exception in thread "main" polyglot.util.InternalCompilerError: NPE while trying
to inline setAttrib(...) with context aspect org.atrack.policy.SessionTracer
issingleton
        at abc.weaving.aspectinfo.PointcutRef.inline(PointcutRef.java:124)
        at abc.weaving.aspectinfo.Pointcut.normalize(Pointcut.java:83)
        at
abc.weaving.aspectinfo.AbstractAdviceDecl.preprocess(AbstractAdviceDecl.java:123)
        at
abc.weaving.aspectinfo.GlobalAspectInfo.computeAdviceLists(GlobalAspectInfo.java:413)
        at abc.main.Main.weave(Main.java:878)
        at abc.main.Main.run(Main.java:576)
        at abc.main.Main.main(Main.java:191)
Caused by: java.lang.NullPointerException
        at
abc.weaving.aspectinfo.GlobalAspectInfo.getPointcutDecl(GlobalAspectInfo.java:196)
        at abc.weaving.aspectinfo.PointcutRef.getDecl(PointcutRef.java:65)
        at abc.weaving.aspectinfo.PointcutRef.inline(PointcutRef.java:97)
        at abc.weaving.aspectinfo.AndPointcut.inline(AndPointcut.java:76)
        at abc.weaving.aspectinfo.PointcutRef.inline(PointcutRef.java:121)
        ... 6 more

The pointcut itself is quite complicated:

    private pointcut setAttrib(HttpSession session, String name, Object value) :
        (call(void HttpSession+.setAttribute(..)) ||
        call(void HttpSession+.putValue(..))) &&
        target(session) && args(name, value) && scope();

Where scope() is:
    abstract protected pointcut scope();

Specifically, in SessionTracer, it is:
    public pointcut scope() : AtrackExecutionTracer.scope();

In AtrackExecutionTracer, it is:
    public pointcut scope(): within(org.atrack..*);

Please let me know what other information is needed to diagnose this.

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
Received on Thu Sep 23 20:29:45 2004

This archive was generated by hypermail 2.1.8 : Thu Sep 23 2004 - 20:30:02 BST