Details
-
Bug
-
Resolution: Fixed
-
Major
-
17.10.10
-
Unknown
-
N/A
-
N/A
-
Description
The AspectJ backward-compatibility aspect IncludeMacroCompatibilityAspect is meant to restore the legacy behaviour of the include macro: when no reference (or deprecated document) parameter is given, it should throw a MacroExecutionException ("You must specify a 'reference' parameter pointing to the entity to include.").
The advice is never woven: AspectJ reports advice ... has not been applied [Xlint:adviceDidNotMatch], so the legacy check never runs. Two reasons:
- The pointcut uses call(* IncludeMacro.execute(..)). A call() pointcut only matches call sites located inside the woven classes, but the actual call to IncludeMacro.execute(..) happens in the macro-transformation code, outside this module's woven scope. It therefore matches nothing.
- The pointcut binds a single argument (args(parameters)) whereas IncludeMacro.execute takes three arguments, so it could not have matched the real method signature anyway.
Found while promoting AspectJ Xlint warnings to errors so that a non-woven backward-compatibility advice fails the build (XCOMMONS-3728).
Attachments
Issue Links
- relates to
-
XCOMMONS-3728 Fail the build when a backward-compatibility AspectJ advice is not weaved
-
- Closed
-