Community
Participate
Working Groups
Compared to other advice annotations, AfterReturning and AfterThrowing has an additional 'pointcut' property (that overrides the 'value' property). This is, IMO, unnecessary learning burden on users. This can be fixed in two ways: 1. (My preference -- one less thing to learn) Deprecate the 'pointcut' property eventually removing it. This should be big burden on users since the change required is pretty trivial. 2. Add the 'pointcut' property to all advice annotations.
Correction: This should be big burden --> This should not be big burden
Thinking more, I have even stronger preference for the first option (deprecate the "pointcut" attribute). It is not just other kind of advice, but none of the other constructs follow this kind of arrangement. For example, @DeclareParents doesn't specify "types" attribute (that would take precedence over "value"), nor we have "association" attribute for @Aspect. I think fewer attributes with the "value" attribute specifying the dominant property (expression for pointcut, pointcut for advice, types for declare parents, and association for aspect) of the construct is a simple to explain and easy to maintain approach.
unsetting the target field which is currently set for something already released