On Tue, 19 May 2026 16:33:03 GMT, Bill Huang <[email protected]> wrote:
>> **Tests Updated** >> >> **TEST.groups** >> Add java/util/Collections to valhalla_adopted. >> >> **test/lib** >> Introduces a shared jdk.test.lib.valueclass.Tuple value class (two-int, >> Comparable, with equals/hashCode). >> >> **AddAll.java** >> Broaden the existing @AsValueClass Point path to cover the same collection >> types (LinkedList, HashSet, LinkedHashSet) and verify final contents using >> value equality. >> >> **AsLifoQueue.java** >> Add a parallel LIFO-order block with value-class elements exercising the >> same add/peek/remove/poll operations. >> >> **BigBinarySearch.java** >> Add a minimal comparable value class backed by the existing sparse-list >> structure to verify huge binary search without new edge cases. >> >> **BinarySearchNullComparator.java** >> Add a comparable value-class list and confirm that a null comparator falls >> back to natural ordering correctly. >> >> **CheckedListBash.java** >> Add a checkedList(…, V.class) helper covering insert, >> contains/indexOf/toArray, and wrong-type raw-add rejection. >> >> **CheckedListReplaceAll.java** >> Verify that replaceAll on a checked value list accepts correct-type results >> and throws ClassCastException for wrong-type results. >> >> **CheckedMapBash.java** >> Add a value-key/value checked-map smoke path covering >> put/containsKey/containsValue/equals and raw wrong-type put rejection. >> >> **CheckedMapReplaceAll.java** >> Verify that Map.replaceAll on a checked value map accepts correct-type >> values and rejects wrong-type values. >> >> **CheckedQueue.java** >> Add a checkedQueue(…, V.class) block covering add/peek and wrong-type >> raw-add rejection. >> >> **CheckedSetBash.java** >> Add a checked value-class set helper covering add/contains/remove, equality >> with a copy, and wrong-type raw-add rejection. >> >> **Disjoint.java** >> Add overlapping and non-overlapping value-class collections to confirm that >> disjoint uses value-state equality. >> >> **Enum.java** >> Add a value-class Vector<V> and assert that Collections.list produces an >> equal list in original order. >> >> **EnumerationAsIterator.java** >> Add one value-class data-provider case using >> Collections.enumeration(Arrays.asList(…)) and verify element delivery. >> >> **FindSubList.java** >> Add value-class source and target lists and assert correct first and last >> sublist indices. >> >> **Frequency.java** >> Add a value-class list with repeated separately constructed equal values and >> confirm that frequency counts by value-state equality. >> >> **NCopies.java** >> Add value-class versio... > > Bill Huang has updated the pull request incrementally with one additional > commit since the last revision: > > Update test/jdk/java/util/Collections/Ser.java > > Co-authored-by: Chen Liang <[email protected]> in general changes looks very good and do what is expected. There are few comments inline. test/jdk/java/util/Collections/CheckedListBash.java line 31: > 29: * @key randomness > 30: * @library /test/lib > 31: * @run main CheckedListBash Why ' * @run main CheckedListBash' is needed now? Was it the same as default? Also, there is a new main parameter, like * @run main ${test.main.class} to run current class if needed. You might prefer to use. test/lib/jdk/test/lib/valueclass/Tuple.java line 35: > 33: @AsValueClass > 34: public final class Tuple implements Comparable<Tuple> { > 35: public int x; Doesn't it makes sense to make not Tuple but some more interesting value class. Like @AsValueClass public final class VClass { Integer i; <- value class, should be payload Integer[2] arrI; <- the value array that should be flattened } So it provoke more C2 optimizations. ------------- Changes requested by lmesnik (Committer). PR Review: https://git.openjdk.org/valhalla/pull/2421#pullrequestreview-4330222506 PR Review Comment: https://git.openjdk.org/valhalla/pull/2421#discussion_r3275422161 PR Review Comment: https://git.openjdk.org/valhalla/pull/2421#discussion_r3275444626
