[ https://issues.apache.org/jira/browse/CONFIGURATION-222?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Oliver Heger updated CONFIGURATION-222: --------------------------------------- Fix Version/s: (was: Nightly Builds) 1.3 > Saving PropertiesConfiguration created with PropertiesConfiguration() > constructor creates empty files > ----------------------------------------------------------------------------------------------------- > > Key: CONFIGURATION-222 > URL: https://issues.apache.org/jira/browse/CONFIGURATION-222 > Project: Commons Configuration > Issue Type: Bug > Environment: 1.3RC1 > Reporter: Gabriele Garuglieri > Fix For: 1.3 > > 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. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]