On 2/16/18 6:52 AM, Peter Levart wrote:
I think that the following now never applies (in Finalizer) since
ReferenceQueue never returns the same Reference object more than once:
71 if (this.next == this) // already finalized
72 return;
You could change it into an assert to be comfortable. What do you think?
Finalizer is loaded very early when VM starts and we can't use assert
there (yes it's one of the bootstrapping issues in using new language
features that we'd like to resolve. We cleaned up several bootstrapping
issues in JDK 9).
I'll leave it as is.
thanks
Mandy