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

Mandy Chung mandy.chung at oracle.com
Tue Mar 28 01:35:58 UTC 2017


Looks good.
Mandy

> On Mar 27, 2017, at 5:57 PM, joe darcy <joe.darcy at oracle.com> wrote:
> 
> Hello,
> 
> The implementation of the method System.runFinalizersOnExit uses API elements that are deprecated for removal, namely Runtime.runFinalizersOnExit.
> 
> 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.)
> 
> Thanks,
> 
> -Joe
> 
> 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) {
>         Runtime.runFinalizersOnExit(value);
>     }
> 



More information about the core-libs-dev mailing list