Uploaded image for project: 'Commons Configuration'
  1. Commons Configuration
  2. CONFIGURATION-306

INIConfiguration: Quoted values should not be trimmed

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.5
    • 1.6
    • None
    • None
    • N/A

    Description

      I am reading in .ini files with quoted strings. Here is an example of a line:

      CmdPrompt="[sdog@rosco ~]$ "

      In Commons Configuration 1.4, this incorrectly reads in as "[sdog@rosco ~]$ ". When I saw that this had been addressed in 1.5, I was excited... until I started using 1.5. Now I don't get quotes, but I also don't get my trailing space, which is the reason I'm using quotes in the first place. I expect the offending line is the final line in the parseValue(String) method of INIConfiguration:

      line 403:
      return result.toString().trim();

      Expected behavior: INIConfiguration should read in the exact string between the quotes, not a trimmed version.

      I'm going back to 1.4 and my own code to strip the quotes. Please address this as I cannot move to future versions without it.

      Attachments

        Activity

          People

            oheger Oliver Heger
            jek John Smith
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: