Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8151511

Test case in CollectionAndMapModifyStreamTest for LinkedHashMap overrides that for HashMap

XMLWordPrintable


      As reported by Stephan Zobel on core-libs:

        http://mail.openjdk.java.net/pipermail/core-libs-dev/2016-March/039368.html

      "
      org.openjdk.tests.java.util.stream.CollectionAndMapModifyStreamTest


      has a small copy & paste error in line 116:

      115: maps.put(HashMap.class.getName(), () -> new HashMap<>(content));
      116: maps.put(HashMap.class.getName(), () -> new LinkedHashMap<>(content));

      The same key is used for HashMap and LinkedHashMap, so the tests for
      HashMap never get executed.


      Btw, the "ThowableHelper" from /bootlib/java.base/java/util/stream
      should be renamed to the correct "ThRowableHelper" someday ;-)
      "

            amlu Amy Lu (Inactive)
            psandoz Paul Sandoz
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: