I am given a method in a class like this..
public int foo(String a,String b){}
Now I want to apply a pointcut at this point and using around advice I want to alter the second argument.
public aspect Aspect {
int around(String s): call(int foo(Object,String)) && args(i) {
int i = proceed(i.concat("hello"));
return i;
}
}
But I am not able to do so..Its giving me the error that Aspect has not been applied.
adviceDidnotMatch..
Any help please..I am stuck..:-/
Thanks in advance..
Your
proceed()andaround()don’t match.proceed()should be called with both arguments.