8301627: System.exit and Runtime.exit debug logging

Reviewed-by: alanb, chegar
This commit is contained in:
Roger Riggs 2023-02-21 15:37:08 +00:00
parent db483a38a8
commit 10b4cc9eb4
6 changed files with 160 additions and 0 deletions

View file

@ -156,6 +156,11 @@ public class Runtime {
* <p> The {@link System#exit(int) System.exit} method is the
* conventional and convenient means of invoking this method.
*
* @implNote
* If the {@linkplain System#getLogger(String) system logger} for {@code java.lang.Runtime}
* is enabled with logging level {@link System.Logger.Level#DEBUG Level.DEBUG} the stack trace
* of the call to {@code Runtime.exit()} is logged.
*
* @param status
* Termination status. By convention, a nonzero status code
* indicates abnormal termination.