commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Bourg (JIRA)" <>
Subject [jira] Created: (CONFIGURATION-332) doesn't persist properties added through a DataConfiguration
Date Fri, 04 Jul 2008 15:55:32 GMT doesn't persist properties added through a DataConfiguration

                 Key: CONFIGURATION-332
             Project: Commons Configuration
          Issue Type: Bug
    Affects Versions: 1.5
            Reporter: Emmanuel Bourg
            Priority: Critical
             Fix For: 1.6

There is a regression in Commons Configuration with PropertiesConfiguration wrapped into a
DataConfiguration. The properties added through a DataConfiguration aren't persisted when
the configuration is saved, but they can be queried normally. Commons Configuration 1.4 wasn't
affected by this issue.

The following test fails on the last assertion :

public void testSaveWithDataConfiguration() throws ConfigurationException
    File file = new File("target/");
    if (file.exists()) {

    PropertiesConfiguration config = new PropertiesConfiguration(file);

    DataConfiguration dataConfig = new DataConfiguration(config);

    dataConfig.setProperty("foo", "bar");
    assertEquals("bar", config.getProperty("foo"));;

    // reload the file
    PropertiesConfiguration config2 = new PropertiesConfiguration(file);
    assertFalse("empty configuration", config2.isEmpty());

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message