Possibility of using preview features(StableValue) in java.desktop module

Sergey Bylokhov bylokhov at amazon.com
Thu Sep 25 21:17:46 UTC 2025


On 9/25/25 12:59, Philip Race wrote:
> I have no general objection to this.
> I would use it where lazy initialization will provide a clear benefit,
> but not as a general replacement for final.

I did not even consider using StableValue as the 'super final', only as a possible way to implement 
singletons (which we usually do via double-checked locking, the holder idiom, or sometimes even with 
incorrect synchronization).

-- 
Best regards, Sergey.


More information about the client-libs-dev mailing list