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

[configuration] MapConfiguration does not decode escaped Delimiters

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.3
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      Operating System: other
      Platform: Other

    • Bugzilla Id:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: