Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-24612

Backward-compatibility aspect for SkinFileExtensionPluginApi.use() is never woven

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 18.7.0-rc-1
    • 17.10.10
    • Skin
    • Unknown
    • N/A
    • N/A

    Description

      The AspectJ backward-compatibility aspect SkinFileExtensionPluginApiCompatibilityAspect is supposed to remap deprecated skin-file-extension resource paths (for example js/xwiki/editors/fullScreenEdit.js to uicomponents/widgets/fullScreen.js) when they are pulled through SkinFileExtensionPluginApi.use(String).

      The advice is never woven: AspectJ reports advice ... has not been applied [Xlint:adviceDidNotMatch]. As a result the compatibility remapping silently does nothing, so code still using the old deprecated paths gets neither the remapping nor the deprecation warning.

      The around advice also has a logic bug independent of the weaving: it calls proceed() twice (once with the remapped path, then again with the original path), so even if it had matched it would have registered the extension twice and still used the deprecated path.

      Found while promoting AspectJ Xlint warnings to errors so that a non-woven backward-compatibility advice fails the build (XCOMMONS-3728).

      Attachments

        Issue Links

          Activity

            People

              vmassol Vincent Massol
              vmassol Vincent Massol
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: