You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Gabriele Garuglieri (JIRA)" <ji...@apache.org> on 2006/08/28 11:13:22 UTC

[jira] Created: (CONFIGURATION-222) Saving PropertiesConfiguration created with PropertiesConfiguration() constructor creates empty files

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


[jira] Resolved: (CONFIGURATION-222) Saving PropertiesConfiguration created with PropertiesConfiguration() constructor creates empty files

Posted by "Oliver Heger (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/CONFIGURATION-222?page=all ]

Oliver Heger resolved CONFIGURATION-222.
----------------------------------------

    Fix Version/s: Nightly Builds
       Resolution: Fixed

Patch applied. Very good work! Many thanks!

> 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
>             Fix For: Nightly Builds
>
>         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


[jira] Updated: (CONFIGURATION-222) Saving PropertiesConfiguration created with PropertiesConfiguration() constructor creates empty files

Posted by "Oliver Heger (JIRA)" <ji...@apache.org>.
     [ 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: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org