Uploaded image for project: 'XWiki Rendering'
  1. XWiki Rendering
  2. XRENDERING-787

MacroManager#exists is not consistent with the behaviour of MacroManager#getMacro

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 17.5.0-rc-1
    • 17.3.0
    • Transformation
    • None
    • Unit
    • Unknown
    • N/A
    • N/A

    Description

      MacroManager#getMacro always try to fallback on searching for the macro name without the syntax, while exists only check the given macro id, with the syntax exists.
      IMO if MacroManager#exists returns false then MacroManager#getMacro with same id shouldn't return anything.

      I propose to fix that by providing a new MacroManager#exists method with a boolean flag to avoid any breakage.

      Attachments

        Activity

          People

            surli Simon Urli
            surli Simon Urli
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: