RFR of JDK-8177682: Suppress removal warning for System.runFinalizersOnExit

joe darcy joe.darcy at oracle.com
Tue Mar 28 00:57:53 UTC 2017


The implementation of the method System.runFinalizersOnExit uses API 
elements that are deprecated for removal, namely 

System.runFinalizersOnExit is itself deprecated for removal. Until it is 
removed, the lint warning associated with using a deprecated for removal 
API should be suppressed.

Please review the patch below to suppress this warning.

(This issue is a subtask of JDK-8177553: Address removal lint warnings 
in the JDK build. I'd prefer to get JDK-8177553 addressed in JDK 9; 
however, if that is not approved as part of rampdown 2, I'll push the 
associated changes to JDK 10.)



diff -r fb54b256d751 src/java.base/share/classes/java/lang/System.java
--- a/src/java.base/share/classes/java/lang/System.java    Mon Mar 27 
15:12:01 2017 -0700
+++ b/src/java.base/share/classes/java/lang/System.java    Mon Mar 27 
17:47:08 2017 -0700
@@ -1738,6 +1738,7 @@
       * @since   1.1
      @Deprecated(since="1.2", forRemoval=true)
+    @SuppressWarnings("removal")
      public static void runFinalizersOnExit(boolean value) {

More information about the core-libs-dev mailing list