Summary: | Nullpointer-exception in pointcuts using withincode() clause | ||
---|---|---|---|
Product: | [Tools] AspectJ | Reporter: | Michael Moser <mmo> |
Component: | Compiler | Assignee: | Andrew Clement <aclement> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | major | ||
Priority: | P3 | CC: | hr_stoyanov |
Version: | 1.2 | ||
Target Milestone: | 1.2.1 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Michael Moser
2004-06-18 04:54:37 EDT
Thanks Michael for privately sending me your source... from all that source I've finally recreated the problem with this tiny program: aspect B { public A.new(String s) { } declare warning: withincode(void main(..)): "X"; } class A { private final static String name = A.class.getName(); } I suspected it was an initialization issue but I couldn't recreate it myself. Then I learned from your application that an ITD'd ctor was also in the mix. Anyway, I'll now work on fixing it ... *** Bug 65688 has been marked as a duplicate of this bug. *** Ok. The problem is to do with the preinitialization join point shadow not correctly returning the right signature for the ctor that contains it. It returns null when asked 'where are you?' - which results in an NPE. Although the pointcuts we are discussing in this bug are looking for other shadows (not in ctors), we still attempt to match against preinitialization shadows from ITDd ctors. The fix is to simply get it to return the signature for the ctor containing it. Fix checked in, waiting for build before closing this bug. Fixed, available in dev build: BUILD COMPLETE - build.324 Date of build: 08/02/2004 15:14:37 Time to build: 100 minutes 0 seconds Last changed: 08/02/2004 14:43:47 Last log entry: Fix for Bugzilla Bug 67774 Nullpointer-exception in pointcuts using withincode() clause Latest good AspectJ jar available at: download.eclipse.org/technology/ajdt/dev/aspectj-DEVELOPMENT.jar Fix released as part of AspectJ 1.2.1 |