Commons Configuration
  1. Commons Configuration
  2. CONFIGURATION-120

[configuration] Missing classes after move to commons proper

    Details

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

      Operating System: other
      Platform: Other

      Description

      I just found out that the actual CVS head does not contain all changes of the
      latest sandbox commits. I think there was one commit, which added the class
      ConfigurationXMLDocument, a corresponding test class, an enhancement of the
      examples page and some smaller fixes. Obviously these changes have been lost
      when moving from sandbox to proper.

      With CVS view I found out that ConfigurationXMLDocument is now in the attic of
      CVS, in head it is missing. The same is true for the test case
      TestConfigurationXMLDocument.java. In examples.xml the last chapter about
      ConfigurationXMLDocument is missing; the version, which is in the attic of the
      sandbox contains this section.

      Some other incosistencies that occurred to me are in the conf directory. Some of
      the test configuration files for ConfigurationFactory had been modified to get
      rid off the unnecessary className attribute. The actual CVS versions have this
      attribute again. Here the versions in the sandbox attic are more actual.

      I don't know if more changes have been lost in the move, these are the ones I
      found out. If the idea is correct that they all belong to one commit, you may be
      able to restore all from the CVS log.

        Activity

        Hide
        David Eric Pugh added a comment -

        Oliver,

        I see the problem.. Would you mind resubmitting this code? Moving
        Configuration from sandbox to commons proper was my first time, and I must
        have goofed something. If you can just validate that the
        ConfigurationXMLDocument works properly after the refactorings then we can get
        this in.

        Eric

        Show
        David Eric Pugh added a comment - Oliver, I see the problem.. Would you mind resubmitting this code? Moving Configuration from sandbox to commons proper was my first time, and I must have goofed something. If you can just validate that the ConfigurationXMLDocument works properly after the refactorings then we can get this in. Eric
        Hide
        Oliver Heger added a comment -

        Created an attachment (id=10597)
        A patch with all affected files

        Show
        Oliver Heger added a comment - Created an attachment (id=10597) A patch with all affected files
        Hide
        Oliver Heger added a comment -

        Okay, here is the data again.

        As you can see, a whole bunch of files were affected. I hope I did not break any
        new functionality, but all unit tests run without problems.

        Two things are a bit strange:

        1. The patch (created using Eclipse) contains the complete examples.xml file.
        Obviously Eclipse thinks that the remote file is empty.

        2. After recovering the changes related to ConfigurationXMLDocument there was an
        error in the unit test of CompositeConfiguration, method testGetProperty(). This
        test failed because the property "propertyInOrder" could not be found in both
        the test.properties files. I added this property again and now everything runs
        fine, but I don't know what originally caused the problem.

        Please doublecheck everything carefully!

        Oliver

        Show
        Oliver Heger added a comment - Okay, here is the data again. As you can see, a whole bunch of files were affected. I hope I did not break any new functionality, but all unit tests run without problems. Two things are a bit strange: 1. The patch (created using Eclipse) contains the complete examples.xml file. Obviously Eclipse thinks that the remote file is empty. 2. After recovering the changes related to ConfigurationXMLDocument there was an error in the unit test of CompositeConfiguration, method testGetProperty(). This test failed because the property "propertyInOrder" could not be found in both the test.properties files. I added this property again and now everything runs fine, but I don't know what originally caused the problem. Please doublecheck everything carefully! Oliver
        Hide
        David Eric Pugh added a comment -

        Oliver, sorry it took so long, but it is in.. I took the content from
        example.xml and added it a new howto_xml.xml document.. However, i think
        the "flow" of the howto_xml and howto_configurationfactory has been really
        messed up by myself... We should probably redo those examples.. Maybe merge
        them back into one document?

        Show
        David Eric Pugh added a comment - Oliver, sorry it took so long, but it is in.. I took the content from example.xml and added it a new howto_xml.xml document.. However, i think the "flow" of the howto_xml and howto_configurationfactory has been really messed up by myself... We should probably redo those examples.. Maybe merge them back into one document?
        Hide
        Oliver Heger added a comment -

        Created an attachment (id=10732)
        Make patch compatible with other changes

        Show
        Oliver Heger added a comment - Created an attachment (id=10732) Make patch compatible with other changes
        Hide
        Oliver Heger added a comment -

        The new SubsetConfiguration class caused the problems.
        HierarchicalConfiguration.subSet() was changed to return such a
        SubsetConfiguration object, which broke the contract (stated in the javadocs)
        that the subset of a HierarchicalConfiguration is a HierarchicalConfiguration
        again. I restored the old implementation and modified it so that the key
        handling in the subset is compatible with SubsetConfiguration.

        I also had to restore the subset() implementation of CompositeConfiguration. Now
        all unit tests run.

        Oliver

        Show
        Oliver Heger added a comment - The new SubsetConfiguration class caused the problems. HierarchicalConfiguration.subSet() was changed to return such a SubsetConfiguration object, which broke the contract (stated in the javadocs) that the subset of a HierarchicalConfiguration is a HierarchicalConfiguration again. I restored the old implementation and modified it so that the key handling in the subset is compatible with SubsetConfiguration. I also had to restore the subset() implementation of CompositeConfiguration. Now all unit tests run. Oliver
        Hide
        David Eric Pugh added a comment -

        Patch applied, unit tests pass! thanks..

        Show
        David Eric Pugh added a comment - Patch applied, unit tests pass! thanks..

          People

          • Assignee:
            Unassigned
            Reporter:
            Oliver Heger
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development