Integrated: 8351230: Collections.synchronizedList returns a list that is not thread-safe
Stuart Marks
smarks at openjdk.org
Mon May 19 16:56:00 UTC 2025
On Thu, 1 May 2025 19:05:50 GMT, Stuart Marks <smarks at openjdk.org> wrote:
> Collections.synchronizedList() returns a List implementation that doesn't do proper locking. This PR does the following on the synchronized wrapper:
>
> - overrides and adds locking to SequencedCollection methods;
> - performs instance management of reversed synchronized views;
> - adds test for race conditions and functional tests of synchronized wrappers.
This pull request has now been integrated.
Changeset: 6818dcc0
Author: Stuart Marks <smarks at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/6818dcc08ed85e220c5206fda5c991b886e35334
Stats: 260 lines in 3 files changed: 247 ins; 9 del; 4 mod
8351230: Collections.synchronizedList returns a list that is not thread-safe
Reviewed-by: jpai
-------------
PR: https://git.openjdk.org/jdk/pull/24990
More information about the core-libs-dev
mailing list