| Summary: | Around advice throws IndexOutOfBoundException | ||
|---|---|---|---|
| Product: | [Tools] AspectJ | Reporter: | Nobody - feel free to take it <nobody> |
| Component: | Runtime | Assignee: | aspectj inbox <aspectj-inbox> |
| Status: | NEW --- | QA Contact: | |
| Severity: | major | ||
| Priority: | P3 | CC: | aclement |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
if you want a workaround before this gets addressed, use:
@Around(" serviceCall() && this(me) ")
public Object adviceThrowsOutOfBoundEx(ProceedingJoinPoint pjp, Main me) throws
Throwable {
Object o = pjp.proceed(new Object[] { me,pjp.getArgs()[0] });
return o;
}
|
Build Identifier: 20110615-0604 This annotated around advice throws an IndexOutOfBoundEx: ---- @Around(" serviceCall() && this(me) ") public Object adviceThrowsOutOfBoundEx(ProceedingJoinPoint pjp, Main me) throws Throwable { Object o = pjp.proceed(new Object[] { me }); return o; } ---- * serviceCall() = "call(public benoit.dto.Response benoit.service.Service.serviceOne(benoit.dto.Request) " Yet the equivalent advice with aspectj syntax works just fine: ---- Object around(Main me) : serviceCall() && this(me) { Object o = proceed(me); return o; } ---- Surprisingly the annotated advice does work when binding both this() and args(): ---- @Around(" serviceCall() && this(me) && args(request) ") public Object adviceRunsFine(ProceedingJoinPoint pjp, Main me, Request request) throws Throwable { Object o = pjp.proceed(new Object[] { me , request}); return o; } ---- Kind Regards, BenoƮt Reproducible: Always