Uploaded image for project: 'Commons Configuration'
  1. Commons Configuration
  2. CONFIGURATION-653

ConfigurationUtils.dump and other methods should use ImmutableConfiguration

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.1, 2.1.1
    • 2.2
    • None
    • None

    Description

      Since the read-only ImmutableConfiguration/ImmutableHierarchicalConfiguration has been introduced, several methods that uses Configuration in a read-only fashion should be adapted to use these ones instead of the read/write alternative.

      For example :
      ConfigurationUtils.dump
      ConfigurationUtils.toString
      ConfigurationUtils.copy (for the source)
      ConfigurationUtils.append (for the source)
      ConfigurationUtils.convertToHierarchical
      ConfigurationConverter.getProperties
      ... and maybe others

      It should not break any existing code as Configuration implements ImmutableConfiguration and it could enable code that manipulates read only configurations to use these utilities

      Attachments

        1. two_versions.diff
          12 kB
          Vincent Maurin
        2. use_immutable.diff
          9 kB
          Vincent Maurin

        Activity

          People

            Unassigned Unassigned
            vmaurin_glispa Vincent Maurin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: