-
Bug
-
Resolution: Fixed
-
P4
-
jfx18
-
b05
The System.runFinalization and Runtime.runFinalization methods are terminally deprecated by JEP 421 (JDK-8274609). ImagePool.pruneCache calls System.runFinalization which results in a "removal" warning.
$ gradle --info -PLINT=removal sdk
...
modules/javafx.graphics/src/main/java/com/sun/scenario/effect/impl/ImagePool.java:259: warning: [removal] runFinalization() in System has been deprecated and marked for removal
System.runFinalization();
^
modules/javafx.graphics/src/main/java/com/sun/scenario/effect/impl/ImagePool.java:261: warning: [removal] runFinalization() in System has been deprecated and marked for removal
System.runFinalization();
^
The only purpose of calling runFinalization was to cause finalize to be called on JavaFX images. Since the JavaFX runtime no longer uses finalization anywhere, the calls to runFinalization are unnecessary and should be removed.
NOTE: several tests also call System.runFinalization; I will file a separate bug for the tests.
$ gradle --info -PLINT=removal sdk
...
modules/javafx.graphics/src/main/java/com/sun/scenario/effect/impl/ImagePool.java:259: warning: [removal] runFinalization() in System has been deprecated and marked for removal
System.runFinalization();
^
modules/javafx.graphics/src/main/java/com/sun/scenario/effect/impl/ImagePool.java:261: warning: [removal] runFinalization() in System has been deprecated and marked for removal
System.runFinalization();
^
The only purpose of calling runFinalization was to cause finalize to be called on JavaFX images. Since the JavaFX runtime no longer uses finalization anywhere, the calls to runFinalization are unnecessary and should be removed.
NOTE: several tests also call System.runFinalization; I will file a separate bug for the tests.
- relates to
-
JDK-8278430 Several tests use terminally deprecated System.runFinalization method
-
- Resolved
-
-
JDK-8276447 Deprecate finalization-related methods for removal
-
- Resolved
-
-
JDK-8274609 JEP 421: Deprecate Finalization for Removal
-
- Closed
-