Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8351970: Retire JavaLangAccess::exit #24066

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions src/java.base/share/classes/java/lang/System.java
Original file line number Diff line number Diff line change
@@ -2196,11 +2196,6 @@ public NativeLibraries nativeLibrariesFor(ClassLoader loader) {
return ClassLoader.nativeLibrariesFor(loader);
}

@Override
public void exit(int statusCode) {
Shutdown.exit(statusCode);
}

public Thread[] getAllThreads() {
return Thread.getAllThreads();
}
Original file line number Diff line number Diff line change
@@ -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.
*/
Original file line number Diff line number Diff line change
@@ -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 static void handleUncaughtException(Throwable t) {
t.printStackTrace();
System.err.println("Unrecoverable uncaught exception encountered. The VM will now exit");
} finally {
JLA.exit(1);
System.exit(1);
}
}
}