Uploaded image for project: '[Read Only] - Hippo Essentials'
  1. [Read Only] - Hippo Essentials
  2. ESSENTIALS-1085

Incorrect XmlInstruction implementation of setting overwrite=true

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • 4.0.0
    • None
    • None
    • Platform159:Post-bang/Pre-beta

    Description

      The current XmlInstruction allows specifying overwrite=true, meaning that existing configuration will (or better: should) be replaced.

      However the implementation incorrectly 'just' loads the configuration (through Session.importXML), without taking care (removal?) of the existing configuration first.

      Which therefore either:

      • fails if same-name-siblings are not allowed
      • incorrectly 'succeeds' if same-name-siblings are allowed, then creating a second(ary) configuration sibling

      Neither of the above is correct and this should be fixed or the support for override=true disabled, at least for now.

      As none of the current Essentials plugins use/expect/need overide=true, and furthermore the proper handling needed requires further consideration (should it blindly delete the existing configuration, including possible user modifications?), for now we will disable the usage of override=true, and also clearly state this in the API javadoc.

      When invoking XmlInstruction.setOverwrite(true) an UnsupportedOperationException will be thrown.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              adouma Ate Douma (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: