--- jsr166/src/test/tck/ConcurrentSkipListSubSetTest.java 2015/05/24 01:42:14 1.34 +++ jsr166/src/test/tck/ConcurrentSkipListSubSetTest.java 2018/01/07 22:59:18 1.38 @@ -30,11 +30,10 @@ public class ConcurrentSkipListSubSetTes /** * Returns a new set of given size containing consecutive - * Integers 0 ... n. + * Integers 0 ... n - 1. */ - private NavigableSet populatedSet(int n) { - ConcurrentSkipListSet q = - new ConcurrentSkipListSet(); + private static NavigableSet populatedSet(int n) { + ConcurrentSkipListSet q = new ConcurrentSkipListSet<>(); assertTrue(q.isEmpty()); for (int i = n - 1; i >= 0; i -= 2) @@ -52,7 +51,7 @@ public class ConcurrentSkipListSubSetTes /** * Returns a new set of first 5 ints. */ - private NavigableSet set5() { + private static NavigableSet set5() { ConcurrentSkipListSet q = new ConcurrentSkipListSet(); assertTrue(q.isEmpty()); q.add(one); @@ -70,7 +69,7 @@ public class ConcurrentSkipListSubSetTes /** * Returns a new set of first 5 negative ints. */ - private NavigableSet dset5() { + private static NavigableSet dset5() { ConcurrentSkipListSet q = new ConcurrentSkipListSet(); assertTrue(q.isEmpty()); q.add(m1); @@ -476,7 +475,7 @@ public class ConcurrentSkipListSubSetTes } /** - * A deserialized serialized set has same elements + * A deserialized/reserialized set equals original */ public void testSerialization() throws Exception { NavigableSet x = populatedSet(SIZE); @@ -975,7 +974,7 @@ public class ConcurrentSkipListSubSetTes } /** - * A deserialized serialized set has same elements + * A deserialized/reserialized set equals original */ public void testDescendingSerialization() throws Exception { NavigableSet x = dset5();