On Thu, 8 May 2025 14:44:26 GMT, Chen Liang <li...@openjdk.org> wrote:
>> This PR proposed to let `ReverseOrderListView::reversed` return `base` so >> that nested reversed views are avoided. > > test/jdk/java/util/Collection/MOAT.java line 507: > >> 505: private static <T> void testImmutableSeqColl(final >> SequencedCollection<T> c, T t) { >> 506: SequencedCollection<T> r = c.reversed(); >> 507: if (r instanceof List<T> list && list.reversed() != c) { > > Shouldn't all double-reverse be identity? Why is this restricted to lists? This should already be covered by the testDoubleReverse() test in test/jdk/java/util/SequencedCollection/Basic.java. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/25120#discussion_r2080043447