RFR: 8273581: Change the mechanism by which JDK loads the platform-specific FontManager class [v3]

Sergey Bylokhov serb at openjdk.java.net
Mon Sep 20 20:57:44 UTC 2021


On Mon, 20 Sep 2021 17:47:18 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> So I guess the question is whether there is a valid transitory failure use case?
>
>> The difference is that Holder will fail that way forever, while the DLC have a chance to resurrect on next call.
> 
> Is it really possible that next call will succeed after the previous one failed with an exception?

It may fail when one thread got OOM, but later another/this one will work fine. We can use a holder if there will be some real benefits from using it, but DCL is just simpler and safer in this particular case.

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

PR: https://git.openjdk.java.net/jdk/pull/5517



More information about the client-libs-dev mailing list