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

XMLConfiguration.getStringArray does not parse OS Environment Variables

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.8
    • 2.x
    • Interpolation
    • None
    • Windows XP, Commons Configuration 1.8

    Description

      When using a OS environment variable in an XMLConfiguration file, the getStringArray() method does not correctly parse multiple items in the same entry.

      XML:
      ...
      <items>{$env:items}</items>
      ...

      Windows Environment variable %items% is set to "item1,item2".

      Code:
      ...
      String[] items = config.getStringArray("items")
      for (Sting item : items) {
      System.out.println("Item: " + item);
      }
      ...

      Output:
      Item: item1,item2

      Attachments

        Activity

          People

            Unassigned Unassigned
            cjjackson Chris Jackson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: