This issue has been created
There are 2 updates.
 
 
XWiki Platform / cid:jira-generated-image-avatar-24cdb7b3-913a-46ae-a835-d74b2cf494e9 XWIKI-24613 Open

Backward-compatibility aspect for the Include macro (missing-reference check) is never woven

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-1f41d1fa-8d28-4f3f-b838-57ea928f91f5 Vincent Massol created this issue on 23/Jul/26 23:20
 
Summary: Backward-compatibility aspect for the Include macro (missing-reference check) is never woven
Issue Type: cid:jira-generated-image-avatar-24cdb7b3-913a-46ae-a835-d74b2cf494e9 Bug
Assignee: Unassigned
Components: Rendering - Include Macro
Created: 23/Jul/26 23:20
Priority: cid:jira-generated-image-static-major-2d6fe723-d44a-40c2-b777-59695bfc76e1 Major
Reporter: Vincent Massol
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).

 
 

2 updates

 
cid:jira-generated-image-avatar-1f41d1fa-8d28-4f3f-b838-57ea928f91f5 Changes by Vincent Massol on 23/Jul/26 23:20
 
Fix Version: 18.7.0-rc-1
Version: 17.10.10