I have a trace aspect that should log:
- Entering
- Exiting (return type is void)
- Returning [returned object]
- Throwinig [Exception message]
I am having problems with the second. How do I create an advice for this case without double-logging all exits that also return something as is the case now when I have one @After advice and one @AfterReturning(value = "publicMethodCall()", returning = "o"). Can I somehow have the @AfterReturning advice be called for void returns and still retrieving its value when it returns are non-void (probably not as it would be impossible to tell if the method returned null or if the return type was void).
I a, guessing this should be easy but I can't see it...