[
https://issues.apache.org/jira/browse/CONFIGURATION-329?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Emmanuel Bourg resolved CONFIGURATION-329.
------------------------------------------
Resolution: Invalid
Actually load(File) doesn't change the source of the configuration, you have to
call setFile() and then load() to enable the auto save feature.
> Auto saving does not work
> -------------------------
>
> Key: CONFIGURATION-329
> URL: https://issues.apache.org/jira/browse/CONFIGURATION-329
> Project: Commons Configuration
> Issue Type: Bug
> Affects Versions: 1.4
> Environment: Debian Etch i386, Java 1.6
> Reporter: André Geisler
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> PropertiesConfiguration does not auto save the properties file under the
> following circumstances:
> File before:
> key=test2
> PropertiesConfiguration conf2 = new PropertiesConfiguration();
> conf2.load(new File("test2.properties"));
> conf2.setAutoSave(true);
> System.out.println("Conf2: Before changing value:" +
> conf2.getProperty("key"));
> conf2.setProperty("key", "test2after");
> System.out.println("Conf2: After changing value:" +
> conf2.getProperty("key"));
> File after:
> key=test2
> If you use the contrcutor PropertiesConfigurator(File file); everything is
> fine!
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.