On Sun, 29 Sep 2024 17:44:30 GMT, Attila Szegedi <att...@openjdk.org> wrote:
> 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. This pull request has now been integrated. Changeset: 260d4658 Author: Attila Szegedi <att...@openjdk.org> URL: https://git.openjdk.org/jdk/commit/260d4658aefe370d8994574c20057de07fd6f197 Stats: 61 lines in 2 files changed: 60 ins; 1 del; 0 mod 8340572: ConcurrentModificationException when sorting ArrayList sublists Reviewed-by: smarks ------------- PR: https://git.openjdk.org/jdk/pull/21250