On Thu, 27 Jun 2024 19:30:34 GMT, Aleksey Shipilev <[email protected]> wrote:

> I was auditing the current uses of `@Stable` before relaxing its barriers 
> ([JDK-8333791](https://bugs.openjdk.org/browse/JDK-8333791)), and this is an 
> easy spot. 
> 
> `resolvedEnum` is not `final`. So technically publishing the object via data 
> race can show `resolvedEnum` as `null`, which would break `test()` that does 
> not expect it. Currently not a practical problem since its safety is covered 
> by adjacent `final` fields, but should be more precise.

FWIW, there are more `@Stable` uses here:
https://github.com/openjdk/jdk/pull/19906

if you would have a moment to check that, it may be helpful. Thanks.

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

PR Comment: https://git.openjdk.org/jdk/pull/19933#issuecomment-2196499286

Reply via email to