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

Add accessor methods for SharedSecrets#javaLangInvokeAccess #131

Merged
merged 1 commit into from
Jul 30, 2018
Merged
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
15 changes: 15 additions & 0 deletions src/classes/modules/java.base/jdk/internal/misc/SharedSecrets.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public class SharedSecrets {

private static JavaUtilJarAccess javaUtilJarAccess;
private static JavaLangAccess javaLangAccess;
private static JavaLangInvokeAccess javaLangInvokeAccess;
private static JavaIOAccess javaIOAccess;
private static JavaNetURLAccess javaNetURLAccess;
private static JavaIODeleteOnExitAccess javaIODeleteOnExitAccess;
Expand All @@ -71,6 +72,20 @@ public static void setJavaLangAccess(JavaLangAccess jla) {
javaLangAccess = jla;
}

public static void setJavaLangInvokeAccess(JavaLangInvokeAccess jlia) {
javaLangInvokeAccess = jlia;
}

public static JavaLangInvokeAccess getJavaLangInvokeAccess() {
if (javaLangInvokeAccess == null) {
try {
Class<?> c = Class.forName("java.lang.invoke.MethodHandleImpl");
unsafe.ensureClassInitialized(c);
} catch (ClassNotFoundException ignored) {
}
}
return javaLangInvokeAccess;
}

public static void setJavaNetAccess(JavaNetAccess jna) {
javaNetAccess = jna;
Expand Down