DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=35772>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35772

           Summary: ConfigurationUtils.copy() does not work for
                    XMLConfigurations with repeated keys
           Product: Commons
           Version: 3.1
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: major
          Priority: P1
         Component: Configuration
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: [EMAIL PROTECTED]


Copying an XMLConfiguration using the ConfigurationUtils.copy() method does 
not work if there are repeated keys.  The end result is an XMLConfiguration 
with a majority of its properties missing because only the first property 
value for a repeated key is copied to the configuration.

This can be repeated by taking the example database tables XML file on the 
Jakarta Commons Configuration webpage, loading the configuration into an XML 
configuration, creating a new XMLConfiguration using the empty constructor, 
copying the first to the second using the ConfigurationUtils.copy() method, 
and then perform the property queries as described on the webpage.  For 
example, calling getProperty() for 'tables.table(2).name' will fail on the new 
configuration after the original configuration is copied.

This copying is the basis of my entire implementation because I want to be 
able to copy an XMLConfiguration without having to go to the operating system 
and reload a copy from disc.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to