8351970: Retire JavaLangAccess::exit

Reviewed-by: rgiulietti, liach, djelinski
This commit is contained in:
Roger Riggs 2025-03-17 18:55:19 +00:00
parent 3aa6d62afe
commit 19154f7af3
3 changed files with 1 additions and 13 deletions

View File

@ -2196,11 +2196,6 @@ public final class System {
return ClassLoader.nativeLibrariesFor(loader);
}
@Override
public void exit(int statusCode) {
Shutdown.exit(statusCode);
}
public Thread[] getAllThreads() {
return Thread.getAllThreads();
}

View File

@ -477,12 +477,6 @@ public interface JavaLangAccess {
*/
NativeLibraries nativeLibrariesFor(ClassLoader loader);
/**
* Direct access to Shutdown.exit to avoid security manager checks
* @param statusCode the status code
*/
void exit(int statusCode);
/**
* Returns an array of all platform threads.
*/

View File

@ -72,7 +72,6 @@ public final class SharedUtils {
private SharedUtils() {
}
private static final JavaLangAccess JLA = SharedSecrets.getJavaLangAccess();
private static final JavaLangInvokeAccess JLIA = SharedSecrets.getJavaLangInvokeAccess();
private static final MethodHandle MH_ALLOC_BUFFER;
@ -310,7 +309,7 @@ public final class SharedUtils {
t.printStackTrace();
System.err.println("Unrecoverable uncaught exception encountered. The VM will now exit");
} finally {
JLA.exit(1);
System.exit(1);
}
}
}