| Summary: | NPE with @args matching Argument by Type | ||
|---|---|---|---|
| Product: | [Tools] AspectJ | Reporter: | stefan.penndorf |
| Component: | LTWeaving | Assignee: | aspectj inbox <aspectj-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | major | ||
| Priority: | P3 | CC: | aclement |
| Version: | unspecified | ||
| Target Milestone: | 1.6.10 | ||
| Hardware: | PC | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
stefan.penndorf
I tried to build a scenario from your instructions, but it just works fine for me. My code is below - is that the kind of thing you mean? I haven't used spring in this case, I was hoping to recreate it without needing to do so.
---- B.java ----
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
public class B {
public static void main(String[] args) {
new D().foo(null);
}
}
class D {
public void foo(MyInterface mi) {
}
}
@Aspect
class X {
@Before("args(myId)")
public void startsMyIdArgument(final JoinPoint jp, final MyInterface myId) {
}
}
interface MyInterface {
}
----
created the NPE with a unit test (couldn't create it with a compiler test). Fixed it up. |