-
Notifications
You must be signed in to change notification settings - Fork 38.5k
Fix syntax errors in 'args()' AOP sample code #25357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
To me it looks like in your 'args()' argument binding sample pointcuts the syntax is wrong.
@kriegaex Please sign the Contributor License Agreement! Click here to manually synchronize the status of this Pull Request. See the FAQ for frequently asked questions. |
@kriegaex Thank you for signing the Contributor License Agreement! |
Thanks for the PR. It turns out that the examples are actually correct, since they are using a shared common pointcut definition. |
You are right. I did not notice because I did not read the chapter above when looking for reference information about I am very experienced in AspectJ, also in the trickier parts of the syntax. I do not need the manual for myself, being an AspectJ guy (not really a Spring user). I sometimes open the Spring manual in order to find explanations to link to when answering questions on StackOverflow. I did not expect you to use the rather exotic case of a pointcut not declared in the same class, so you have to refer to it via fully qualified name. Thus, it looks like an oops in a method execution pointcut. You really should not expect all users to read the whole manual in one single session and then remember something from a few screens further above. How did I find the chapter? I was looking for the string "args(" on the opened web page in order to find the target chapter I could link to from StackOverflow, as I said. Please consider to either change pointcut naming to something ugly, but obvious like |
Thanks for providing such valid criticism. I agree that it can be confusing if you don't read the whole chapter. I think I'll just rename What do you think about that? By the way, you already inspired me to make the changes in 52c2ca6, before your additional comments. |
I think that is a particularly good idea, much better than mine to rename the pointcut methods themselves. Thank you very much for the swift and constructive reaction. 😀 |
You're very welcome. Changes made in 8be2a43. |
To me it looks like in your 'args()' argument binding sample pointcuts the syntax is wrong.