Details

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

      Operating System: All
      Platform: All

      Description

      Configuration does not honor the prefix delimiter generating subsets:

      config:
      test.a
      testing.b

      subconfig = config.subset("test");

      subconfig:
      a
      ng.b

      Obviously subconfig should have contained only a.

      Patches for AbstractConfiguration and TestBaseConfiguration attached, all
      junit tests work.

        Activity

        joerg.schaible@gmx.de created issue -
        Hide
        joerg.schaible@gmx.de added a comment -

        Created an attachment (id=10656)
        src/java/org/apache/commons/configuration/AbstractConfiguration.java.diff

        Show
        joerg.schaible@gmx.de added a comment - Created an attachment (id=10656) src/java/org/apache/commons/configuration/AbstractConfiguration.java.diff
        Hide
        joerg.schaible@gmx.de added a comment -

        Created an attachment (id=10657)
        src/test/org/apache/commons/configuration/TestBaseConfiguration.java.diff

        Show
        joerg.schaible@gmx.de added a comment - Created an attachment (id=10657) src/test/org/apache/commons/configuration/TestBaseConfiguration.java.diff
        Hide
        Emmanuel Bourg added a comment -

        Another solution is to simply use:

        subconfig = config.subset("test.");

        Show
        Emmanuel Bourg added a comment - Another solution is to simply use: subconfig = config.subset("test.");
        Hide
        joerg.schaible@gmx.de added a comment -

        No:

        config:
        test.abc
        testing.xyz

        subconfig = config.subset("test");

        subconfig:
        bc

        I am quite sure, this is not what you want. But you can enhance the UnitTest

        Show
        joerg.schaible@gmx.de added a comment - No: config: test.abc testing.xyz subconfig = config.subset("test"); subconfig: bc I am quite sure, this is not what you want. But you can enhance the UnitTest
        Hide
        David Eric Pugh added a comment -

        Thanks! I have this applied and all the unit tests past. First time I have
        seen the Transformer class used, and wow.. very cool usage! Anonymous Inner
        class! If you can give it a test?

        Show
        David Eric Pugh added a comment - Thanks! I have this applied and all the unit tests past. First time I have seen the Transformer class used, and wow.. very cool usage! Anonymous Inner class! If you can give it a test?
        Hide
        joerg.schaible@gmx.de added a comment -

        Hi Eric,

        it seems you've mixed up this bug report with something else. Neither seems your comment apply
        to the patch nor is the reported bug fixed in CVS (did you mean 26994 ?). The new
        SubsetConfiguration of Emmanual Bourgh
        (http://article.gmane.org/gmane.comp.jakarta.commons.devel/41897) would have made this patch
        additionally obsolete as already stated in that mail.

        While I saw, that you stated, that you've applied Emmanuels patch also
        (http://article.gmane.org/gmane.comp.jakarta.commons.devel/42228), I cannot see anything in
        CVS. Therefore I've reopened this bug again.

        Regards,
        Jörg

        Show
        joerg.schaible@gmx.de added a comment - Hi Eric, it seems you've mixed up this bug report with something else. Neither seems your comment apply to the patch nor is the reported bug fixed in CVS (did you mean 26994 ?). The new SubsetConfiguration of Emmanual Bourgh ( http://article.gmane.org/gmane.comp.jakarta.commons.devel/41897 ) would have made this patch additionally obsolete as already stated in that mail. While I saw, that you stated, that you've applied Emmanuels patch also ( http://article.gmane.org/gmane.comp.jakarta.commons.devel/42228 ), I cannot see anything in CVS. Therefore I've reopened this bug again. Regards, Jörg
        Hide
        joerg.schaible@gmx.de added a comment -

        Created an attachment (id=10723)
        TestBaseConfiguration.java.2.diff

        Show
        joerg.schaible@gmx.de added a comment - Created an attachment (id=10723) TestBaseConfiguration.java.2.diff
        Hide
        joerg.schaible@gmx.de added a comment -

        Eric,

        I've attached a new patch for the current code of the test case just covering
        the original bug. Test runs fine though, so it is save to apply the patch.

        Regards,
        Jörg

        Show
        joerg.schaible@gmx.de added a comment - Eric, I've attached a new patch for the current code of the test case just covering the original bug. Test runs fine though, so it is save to apply the patch. Regards, Jörg
        Hide
        David Eric Pugh added a comment -

        Okay, patch applied.. I'm going to mark it as closed now.. If something
        doesn't look right, we can reopen it...

        Show
        David Eric Pugh added a comment - Okay, patch applied.. I'm going to mark it as closed now.. If something doesn't look right, we can reopen it...
        Henri Yandell made changes -
        Field Original Value New Value
        issue.field.bugzillaimportkey 27427 12341303
        Henri Yandell made changes -
        Key COM-1151 CONFIGURATION-76
        Project Commons [ 12310458 ] Commons Configuration [ 12310467 ]
        Component/s Configuration [ 12311107 ]
        Assignee Jakarta Commons Developers Mailing List [ commons-dev@jakarta.apache.org ]
        Affects Version/s 1.0 Beta 2 [ 12311650 ]
        Henri Yandell made changes -
        Affects Version/s 1.0 Beta 2 [ 12311851 ]
        Henri Yandell made changes -
        Reporter Jörg Schaible [ joerg.schaible@gmx.de ] Joerg Schaible [ joehni ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Joerg Schaible
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development