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

[configuration] MapConfiguration does not decode escaped Delimiters

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Cannot Reproduce
    • 1.3
    • None
    • None
    • None
    • Operating System: other
      Platform: Other

    • 35442

    Description

      If a Map handed to MapConfiguration which contains entries with escaped
      delimiters in the value, i.e. "\,", it is not decoded.

      -code-sample-
      Map m = new HashMap();
      m.put("foo", "bar
      , baz");
      m.put("bar", "bar, baz");
      Configuration c = new MapConfiguration(m);
      String bad = c.getString("foo"); <-- returns "bar
      , baz" expected "bar, baz"
      String ok = c.getString("bar"); // <-- returns "bar"
      -code-sample-

      It seems that MapConfiguration should employ a similar strategy like
      PropertiesConfiguration - calling undecodeJava on the return value...

      Attachments

        1. ASF.LICENSE.NOT.GRANTED--test.java
          0.4 kB
          Martin Treusch von Buttlar

        Activity

          People

            Unassigned Unassigned
            asf-bugzilla@ruudi.org Martin Treusch von Buttlar
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: