Skip to content

Make Lists.transform() views delegate spliterator()/forEach() to the backing list. - #8685

Merged
copybara-service[bot] merged 1 commit into
masterfrom
test_985343551
Sep 23, 2026
Merged

copybara-service[bot] merged 1 commit into
masterfrom
test_985343551

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Make Lists.transform() views delegate spliterator()/forEach() to the backing list.

TransformingRandomAccessList and TransformingSequentialList previously inherited default implementations from AbstractList/AbstractSequentialList, which lost the backing list's spliterator characteristics (e.g., IMMUTABLE), sized/subsized properties, and custom forEach() optimizations.

Includes a suggestion from @kojallipalli2210-alt on #8589.

Fixes #8165.
Closes #8589.

RELNOTES=collections: In Lists.transform, delegate spliterator() and forEach() to the backing list.

@copybara-service copybara-service Bot changed the title Make Lists.transform() views delegate spliterator()/forEach() to the backing list. Make Lists.transform() views delegate spliterator()/forEach() to the backing list. Sep 21, 2026
@copybara-service
copybara-service Bot force-pushed the test_985343551 branch 3 times, most recently from c2127a4 to 8ded235 Compare September 23, 2026 18:33
…o the backing list.

`TransformingRandomAccessList` and `TransformingSequentialList` previously inherited default implementations from `AbstractList`/`AbstractSequentialList`, which lost the backing list's spliterator characteristics (e.g., `IMMUTABLE`), sized/subsized properties, and custom `forEach()` optimizations.

Includes a suggestion from @kojallipalli2210-alt on #8589.

Fixes #8165.
Closes #8589.

RELNOTES=`collections`: In `Lists.transform`, delegate `spliterator()` and `forEach()` to the backing list.
PiperOrigin-RevId: 986925834
@copybara-service
copybara-service Bot merged commit 7915234 into master Sep 23, 2026
15 checks passed
@copybara-service
copybara-service Bot deleted the test_985343551 branch September 23, 2026 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lists::transform and probably others do not produce spliterators/iterators with correct characteristics

1 participant