Time to retire System.runFinalizersOnExit?

Mandy Chung mandy.chung at oracle.com
Tue Jan 27 04:37:33 UTC 2015


System.runFinalizationOnExit has been deprecated since 1998 (JDK 1.2)
and this method is inherently unsafe.  I am thinking to propose this method
in JDK 9 to throw UnsupportedOperationException.

I believe it's rare for existing applications using System.runFinalizationOnExit.
My analysis on Maven Central ~315K artifacts that show about ~15 unique
artifacts calling System.runFinalizationOnExit while they all come from
only 5 classes.

Any thought/feedback?

Mandy




More information about the core-libs-dev mailing list