Community
Participate
Working Groups
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
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; }