A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://bugs.openjdk.java.net/browse/JDK-8198250 below:

Loading...

Summary

Remove deprecated Runtime::runFinalizersOnExit and System::runFinalizersOnExit methods

Problem

Runtime::runFinalizersOnExit is inherently unsafe. It has been deprecated since 1.2. It has also been deprecated for removal in Java SE 9.

Calling this method may result in finalizers being called on live objects while other threads are concurrently manipulating those objects, resulting in erratic behavior or deadlock. While this problem could be prevented if the class whose objects are being finalized were coded to "defend against" this call, most programmers do not defend against it. They assume that an object is dead at the time that its finalizer is called.

Solution

Remove Runtime::runFinalizersOnExit and System::runFinalizersOnExit methods.

Update the spec of Runtime::addShutdownHook, Runtime::exit, Runtime::halt describing the shutdown sequence and drop the phase about invoking all finalizers before VM halts.

Specification

See attached specdiffs


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.3