Commons Configuration
  1. Commons Configuration
  2. CONFIGURATION-130

[configuration] FileConfiguration - Save problem when embedded spaces are in the path

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.1
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      Operating System: Windows XP
      Platform: PC

      Description

      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. }

        Activity

        Chris Winterscheid created issue -
        Henri Yandell made changes -
        Field Original Value New Value
        issue.field.bugzillaimportkey 35210 12342287
        Henri Yandell made changes -
        Affects Version/s 1.1 Final [ 12311652 ]
        Assignee Jakarta Commons Developers Mailing List [ commons-dev@jakarta.apache.org ]
        Component/s Configuration [ 12311107 ]
        Project Commons [ 12310458 ] Commons Configuration [ 12310467 ]
        Key COM-2135 CONFIGURATION-130
        Henri Yandell made changes -
        Affects Version/s 1.1 Final [ 12311695 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Chris Winterscheid
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development