Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-9754

LinkedCaseInsensitiveMap duplicate element with put()

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 3.0.7, 3.1.2
    • Fix Version/s: 3.1.3, 3.2 M2
    • Component/s: Core
    • Labels:
      None
    • Last commented by a User:
      true

      Description

      I try to use LinkedCaseInsensitiveMap and I expected that using put() method only one element will be created, but it is not true:

      public static void main(String[] args) {
      LinkedCaseInsensitiveMap<String> map = new LinkedCaseInsensitiveMap<String>();
      map.put("aa", "a1");
      map.put("Aa", "a2");
      map.put("aA", "a3");
      map.put("AA", "a4");
      System.out.println(map);
      }

      Output:

      {aa=a1, Aa=a2, aA=a3, AA=a4}

      <-- here the problem

      Doing: map.get("aA") I got "a4"

        Attachments

          Activity

            People

            Assignee:
            juergen.hoeller Juergen Hoeller
            Reporter:
            dani_bs Dan Iele
            Last updater:
            Spring Issues Spring Issues
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              3 years, 29 weeks, 6 days ago