Community
Participate
Working Groups
Some pointcuts will never match because the number of args is specified differently in two places (from signatures and/or args(..)). e.g., pointcut f(String s) : call(void foo(String, String)) && args(s) When weaving advice (but not declare warning), it would be nice to have an XLint warning indicating that the pointcut can never match. (Perhaps also optimize away as never matching.)
The optimization was implemented in AJ5 M1. The XLint warning wasn't. We have a warning in AJ5 M2 that warns if the pointcut is associated with advice (did not match, controlled by @SuppressAjWarnings). We don't warn in any way if the pointcut was associated with a declare statemement. We should consider adding one as this would report the error as close as possible to the textual location in the source.
we have -Xlint:adviceDidNotMatch and @SuppressAjWarnings both fully operational in the AspectJ 5 codebase now.