mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 12:09:14 +00:00
8367597: Runtime.exit logging failed: Cannot invoke "java.lang.Module.getClassLoader()" because "m" is null
Reviewed-by: alanb, rriggs
This commit is contained in:
parent
c7f014ed49
commit
0bc3705948
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -157,8 +157,10 @@ class Shutdown {
|
||||
* which should pass a nonzero status code.
|
||||
*/
|
||||
static void exit(int status) {
|
||||
logRuntimeExit(status); // Log without holding the lock;
|
||||
|
||||
// log only if VM is fully initialized
|
||||
if (VM.isBooted()) {
|
||||
logRuntimeExit(status); // Log without holding the lock;
|
||||
}
|
||||
synchronized (Shutdown.class) {
|
||||
/* Synchronize on the class object, causing any other thread
|
||||
* that attempts to initiate shutdown to stall indefinitely
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user