RFR: 8359119: Change Charset to use StableValue [v2]

Alan Bateman alanb at openjdk.org
Fri Jun 13 07:46:28 UTC 2025


On Tue, 10 Jun 2025 15:22:34 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> So, revert the changes here?
>
> I think it's okay, it's just that the change is a reminder that all ThreadTracker usages can be replaced with a ScopedValue<Boolean> but may require a bit of work to allow using during early VM startup.

I chatted with Andrew Haley yesterday about allowing ScopedValue be used in early startup. Charset is initialized very early in initPhase1, when initializing the system properties, so easy to get recursive initialization issues that surface or NPE or other exceptions.  There are several ways we can fix this and it means that TRACKER is not needed. I don't mind if we change it to use a StableValue now but I expect we will change it very soon to remove ThreadTracker and just replace with ScopedValue.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25727#discussion_r2144408658


More information about the nio-dev mailing list