Ken schrieb:
hi Oliver!

thanks for your response.

i created a simple project in eclipse, but it doesn't work
here's my environment:

JDK:java version "1.5.0_11"
OS: Microsoft WindowsXP Professional
Eclipse: Eclipse 3.3

there are the jars in my project:
Commons Configuration 1.5
commons-collections-3.2.1.jar
commons-lang-2.4.jar
commons-logging-1.1.1.jar
the content of config.properties :

------start----------------
#config.properties
ps = /
------end------------------


After some investigation I think I have discovered the source of the problem: you have hit a bug in Commons Lang [1] that was introduced with the 2.4 release. I still use version 2.3, that's why I cannot reproduce the behavior you see.

Said bug has already been fixed. I don't know whether a bugfix release is planned. Until then I don't know, which is your best option. If you do not need special features of Lang 2.4, you can try downgrading to 2.3.

Oliver

[1] http://issues.apache.org/jira/browse/LANG-421



the content of TestConfiguration.java:

------start----------------
package test;

import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.PropertiesConfiguration;

public class TestConfiguration {
    public static void main(String[] args) {
        try {
            PropertiesConfiguration config =
                new PropertiesConfiguration("config.properties");
//            config.addProperty("aa", "aa");
            config.save();
        } catch (ConfigurationException e) {
            e.printStackTrace();
        }
    }
}
------end------------------






Oliver Heger wrote:
Ken wrote:
hi,

i'm using Commons Configuration for properties files.
a line in my file is "ps = /"
after and saved, it change to "ps = \/",

Is there a way to keep it for "ps = /"

Thanks
Ken

Ken,

with Commons Configuration 1.5 on Windows I am unable to reproduce this
problem. The slash is not modified when the properties file is saved.

Which version of Commons Configuration do you use and what is your
environment?

Is it possible that you send a test properties file and a short code
fragment demonstrating the problem?

Thanks
Oliver

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to