commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gabriele Garuglieri (JIRA)" <j...@apache.org>
Subject [jira] Created: (CONFIGURATION-222) Saving PropertiesConfiguration created with PropertiesConfiguration() constructor creates empty files
Date Mon, 28 Aug 2006 09:13:22 GMT
Saving PropertiesConfiguration created with PropertiesConfiguration() constructor creates empty
files
-----------------------------------------------------------------------------------------------------

                 Key: CONFIGURATION-222
                 URL: http://issues.apache.org/jira/browse/CONFIGURATION-222
             Project: Commons Configuration
          Issue Type: Bug
         Environment: 1.3RC1
            Reporter: Gabriele Garuglieri
         Attachments: layout.patch

The introduction of  PropertiesConfigurationLayout broke the saving of in memory created PropertesConfiguration.

This piece of code will yield empt saved file:
PropertiesConfiguration pc = new PropertiesConfiguration();
pc.addProperty("string", "value1");
pc.save("testsave.properties");

The problem is that no PropertiesConfigurationLayout is created and EVENT_ADD_PROPERTY is
lost.
Then when saving, an empty PropertiesConfigurationLayout is created and nothing is saved in
output file.

Added creation of PropertiesConfigurationLayout  to PropertiesConfiguration() contructor,
changed setLayout() to enforce that only one layout per PropertiesConfiguration must exist
and added a testcase for this condition.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message