Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: Nightly Builds
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

      Description

      A MapConfiguration transforming a Map into a Configuration might be useful. It
      could be associated with a getMap(Configuration) method in the
      ConfigurationConverter class.

        Activity

        Hide
        David Eric Pugh added a comment -

        applied! thanks.

        Show
        David Eric Pugh added a comment - applied! thanks.
        Hide
        Ricardo Gladwell added a comment -

        Created an attachment (id=12408)
        Patch with greater test coverage, also fixes bug that causes set to infinite loop in size() call! Eek!

        Show
        Ricardo Gladwell added a comment - Created an attachment (id=12408) Patch with greater test coverage, also fixes bug that causes set to infinite loop in size() call! Eek!
        Hide
        David Eric Pugh added a comment -

        I am going with the name ConfigurationMap.. The reason is to follw HashMap,
        TreeMap, etc.. this somewhat implies that is is a Map backed by a
        Configuration.

        If it was MapConfiguration then following XmlConfiguration or JNDIConfiguration
        then it is a Configuration backed by a Map!

        It was a very nice clean patch. Just fixed up a couple @author tags. Would you
        mind however adding a more explicit testcase for ConfigurationSet? (Which I
        renamed from EntrySetConfiguration for similar reasons).. the code coverage
        previously was 88% percent and with EntrySetConfiguration being only at 68% it
        drops the average down to 87% percent. I know.. nitpicky, but I love the high
        unit test coverage configuration enjoys!

        Eric Pugh

        Show
        David Eric Pugh added a comment - I am going with the name ConfigurationMap.. The reason is to follw HashMap, TreeMap, etc.. this somewhat implies that is is a Map backed by a Configuration. If it was MapConfiguration then following XmlConfiguration or JNDIConfiguration then it is a Configuration backed by a Map! It was a very nice clean patch. Just fixed up a couple @author tags. Would you mind however adding a more explicit testcase for ConfigurationSet? (Which I renamed from EntrySetConfiguration for similar reasons).. the code coverage previously was 88% percent and with EntrySetConfiguration being only at 68% it drops the average down to 87% percent. I know.. nitpicky, but I love the high unit test coverage configuration enjoys! Eric Pugh
        Hide
        Ricardo Gladwell added a comment -

        Created an attachment (id=12402)
        Patch for MapConfigration object and Junit tests.

        Show
        Ricardo Gladwell added a comment - Created an attachment (id=12402) Patch for MapConfigration object and Junit tests.
        Hide
        Ricardo Gladwell added a comment -

        I have several questions about this: do we want to make Configurations
        sub-classes of Maps (so that they can be simply used with the Java Collections
        library) with a ConfigurationMap being a convenience class to assist
        implementation? Or do we want a ConfigurationMap to be a utility wrapping class
        for those occasions when we need to treat Configurations as Maps?

        Finally, do we want to call it ConfigurationMap or MapConfiguration? And do we
        want to place it in its own sub-package or in the main commons-configuration
        package?

        Show
        Ricardo Gladwell added a comment - I have several questions about this: do we want to make Configurations sub-classes of Maps (so that they can be simply used with the Java Collections library) with a ConfigurationMap being a convenience class to assist implementation? Or do we want a ConfigurationMap to be a utility wrapping class for those occasions when we need to treat Configurations as Maps? Finally, do we want to call it ConfigurationMap or MapConfiguration? And do we want to place it in its own sub-package or in the main commons-configuration package?
        Hide
        David Eric Pugh added a comment -

        See COM-1472 for possible implementation.

        Show
        David Eric Pugh added a comment - See COM-1472 for possible implementation.

          People

          • Assignee:
            Unassigned
            Reporter:
            Emmanuel Bourg
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development