Summary: | NPE at checkAlternateBinding during initial index | ||
---|---|---|---|
Product: | [Tools] AspectJ | Reporter: | Chris West (Faux) <eclipse> |
Component: | Compiler | Assignee: | aspectj inbox <aspectj-inbox> |
Status: | NEW --- | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | aclement |
Version: | 1.6.9 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows Vista | ||
Whiteboard: |
Description
Chris West (Faux)
2010-05-29 22:12:47 EDT
I really have no idea what's going on here, so I went for lowest number of tokens: import java.util.ArrayList; public aspect Pony { boolean around(String[] resources) : args(resources) { return proceed((String[]) new ArrayList().toArray()); } } I just don't even... Trying to recreate this now - finding it tricky. Given that the advice doesn't include a kind (execution/call/etc), I am not sure which joinpoint is causing it a problem. --- Pony.aj import java.util.ArrayList; public aspect Pony { boolean around(String[] resources) : args(resources) { return proceed((String[]) new ArrayList().toArray()); } } --- Target.java class Target { public static boolean main(String[] argv) { return false; } } Compiling these two together works. Although I see with weaveInfo the advice advises itself (because it also takes a String[] argument). Do you have a class you weave that sample against that shows the NPE? The problem is during the compile of the .aj file itself. I can't, however, reproduce this in a clean Eclipse install, with the old project and workspace. Also, it's trivial to work-around by extracting to a local: String[] s = (String[]) new ArrayL.. return proceed(s); I'm guessing interaction with other plugins (<b style="ALARM">Scala</b>, wst, egit or subclipse) but can't really be bothered to diagnose further, sorry for wasting your time. Feel free to close. Clean set-up (where this issue does NOT occur): New Eclipse install (N20100601-2000). New Workspace. Install just ajdt from http://download.eclipse.org/tools/ajdt/36/dev/update New project -> AspectJ. Yes, I'd like the weaving service on. Yes, I'd like to restart. Yes, I'd like to reindex. New -> AspectJ -> Aspect. Name: Pony. Paste in contents from comment 1 Save. unsetting the target field which is currently set for something already released |