Time to retire System.runFinalizersOnExit?
paul.sandoz at oracle.com
Wed Jan 28 16:18:14 UTC 2015
On Jan 28, 2015, at 4:28 PM, Volker Simonis <volker.simonis at gmail.com> wrote:
> I understand that the benefits of calling System.runFinalizersOnExit()
> may be questionable and I don’t have any objections to remove it in
> Java 9. But I'm strongly against changing it to throw an
> UnsupportedOperationException and downport that change to Java 8. In
> my eyes that’s really a no-go.
> I've quickly scanned our SAP-internal Java repositories and found
> several occurrences of System.runFinalizersOnExit() altough most of
> them seem to be in testing/example code. It's perfectly fine if that
> code won't run out of the box in Java 9.
> But it will be totally unacceptable if a product which has been
> certified and runs on Java 8 will suddenly fail with an
> UnsupportedOperationException just because of a new Java 8 update.
Yes, good point, i have a hair-trigger for rarely used unsafe stuff :-)
More information about the core-libs-dev