test/jdk/java/util/concurrent/tck/MapTest.java
changeset 58138 1e4270f875ee
parent 54682 79d13fd7db9c
child 58892 35bac2745d04
equal deleted inserted replaced
58137:6a556bcd94fc 58138:1e4270f875ee
   120      * HashMap: Entry.setValue may not work after Iterator.remove() called for previous entries
   120      * HashMap: Entry.setValue may not work after Iterator.remove() called for previous entries
   121      * ant -Djsr166.tckTestClass=HashMapTest -Djsr166.methodFilter=testBug8186171 -Djsr166.runsPerTest=1000 tck
   121      * ant -Djsr166.tckTestClass=HashMapTest -Djsr166.methodFilter=testBug8186171 -Djsr166.runsPerTest=1000 tck
   122      */
   122      */
   123     public void testBug8186171() {
   123     public void testBug8186171() {
   124         if (!impl.supportsSetValue()) return;
   124         if (!impl.supportsSetValue()) return;
       
   125         if (!atLeastJava10()) return; // jdk9 is no longer maintained
   125         final ThreadLocalRandom rnd = ThreadLocalRandom.current();
   126         final ThreadLocalRandom rnd = ThreadLocalRandom.current();
   126         final boolean permitsNullValues = impl.permitsNullValues();
   127         final boolean permitsNullValues = impl.permitsNullValues();
   127         final Object v1 = (permitsNullValues && rnd.nextBoolean())
   128         final Object v1 = (permitsNullValues && rnd.nextBoolean())
   128             ? null : impl.makeValue(1);
   129             ? null : impl.makeValue(1);
   129         final Object v2 = (permitsNullValues && rnd.nextBoolean() && v1 != null)
   130         final Object v2 = (permitsNullValues && rnd.nextBoolean() && v1 != null)