On Thu, 18 Nov 2021 04:13:21 GMT, Jaikiran Pai <[email protected]> wrote:
>> Stuart Marks has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Remove Finalizer.Holder class.
>
> src/java.base/share/classes/java/lang/ref/Finalizer.java line 195:
>
>> 193:
>> 194: static {
>> 195: if (Holder.ENABLED) {
>
> Hello Stuart,
> My understanding of the the lazy `Holder` is that it's there to delay the
> static initialization of the code that's part of the `Holder`. In this case
> here, the `Holder` is being used right within the `static` block of the
> `Finalizer` class, that too as the first thing. In this case, is that
> `Holder` class necessary?
I pushed an update to remove the Holder class. It seems to continue to work
fine. Thanks for pointing this out @jaikiran !
-------------
PR: https://git.openjdk.java.net/jdk/pull/6442