On Thu, 8 May 2025 14:30:28 GMT, Per Minborg <pminb...@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?

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/25120#discussion_r2079865444

Reply via email to