DO NOT REPLY [Bug 35210] New: - XMLConfiguration - Save problem when embedded spaces are in the path to xml file.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

DO NOT REPLY [Bug 35210] New: - XMLConfiguration - Save problem when embedded spaces are in the path to xml file.

Bugzilla from bugzilla@apache.org
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG?
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=35210>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND?
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35210

           Summary: XMLConfiguration - Save problem when embedded spaces are
                    in the path to xml file.
           Product: Commons
           Version: 1.1 Final
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Configuration
        AssignedTo: [hidden email]
        ReportedBy: [hidden email]


Actual path to file:
C:/Documents and Settings/chrisw/IdeaProjects/sptech-as400-
cmretention/classes/com/sptech/CMRetention/configuration.xml

The configuration file is read correctly without a problem.

The save operation creates the following directory structure and file:
C:/Documents%20and%20Settings/chrisw/IdeaProjects/sptech-as400-
cmretention/classes/com/sptech/CMRetention/configuration.xml

Here is the code that I was using:

        try {
            URL f = getClass().getResource("cmretention.xml");
            XMLConfiguration xml = new XMLConfiguration(f);
            System.out.println(xml.getString("login.user"));
            xml.setAutoSave(true);
            xml.setProperty("login.server",server);
            xml.setProperty("login.user", user);
            xml.setProperty("login.password", password);
            xml.setProperty("paths.library", library);
            xml.save();
        } catch (ConfigurationException e) {
            e.printStackTrace();  //To change body of catch statement use File
| Settings | File Templates.
        }

--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]