RFR: 8340572: ConcurrentModificationException when sorting ArrayList sublists [v2]
Attila Szegedi
attila at openjdk.org
Thu Oct 3 19:31:06 UTC 2024
> Fixes a regression with #17818 where `ArrayList.subList(…).sort()` started incrementing `ArrayList.modCount` resulting in some cases throwing a `ConcurrentModificationException` where none was thrown before.
>
> This change keeps the optimization from #17818 but restores the behavior where only sorting the `ArrayList` changes the mod count, but sorting its sublists does not.
Attila Szegedi has updated the pull request incrementally with one additional commit since the last revision:
- Rename test to more descriptive
- Add a test case for whole list sorting
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/21250/files
- new: https://git.openjdk.org/jdk/pull/21250/files/43185d7e..e0ae1cc9
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=21250&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=21250&range=00-01
Stats: 101 lines in 2 files changed: 59 ins; 42 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/21250.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/21250/head:pull/21250
PR: https://git.openjdk.org/jdk/pull/21250
More information about the core-libs-dev
mailing list