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

Remove Lambda expression to avoid bootstrap problem #113

Merged
merged 1 commit into from
Jan 31, 2019
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
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*/
/*
* ===========================================================================
* (c) Copyright IBM Corp. 2018, 2018 All Rights Reserved
* (c) Copyright IBM Corp. 2018, 2019 All Rights Reserved
* ===========================================================================
*/

Expand Down Expand Up @@ -242,16 +242,31 @@ private boolean usingSharedClasses() {
* Returns if -Xshareclasses is used in the command line //IBM-shared_classes_misc
*/ //IBM-shared_classes_misc
private static boolean isSharedClassesEnabled() { //IBM-shared_classes_misc
return AccessController.doPrivileged((PrivilegedAction<Boolean>) () //IBM-shared_classes_misc
-> Boolean.getBoolean("com.ibm.oti.shared.enabled")); //IBM-shared_classes_misc
/* //IBM-shared_classes_misc
* Lambda expression can't be used here due to bootstrap problem //IBM-shared_classes_misc
* when jdk.internal.lambda.dumpProxyClasses is enabled. //IBM-shared_classes_misc
* More details are at https://github.com/eclipse/openj9/issues/3399 //IBM-shared_classes_misc
*/ //IBM-shared_classes_misc
return AccessController.doPrivileged(new PrivilegedAction<Boolean>() { //IBM-shared_classes_misc
pshipton marked this conversation as resolved.
Show resolved Hide resolved
public Boolean run() { //IBM-shared_classes_misc
return Boolean.getBoolean("com.ibm.oti.shared.enabled"); //IBM-shared_classes_misc
} //IBM-shared_classes_misc
}); //IBM-shared_classes_misc
} //IBM-shared_classes_misc

/* //IBM-shared_classes_misc
* Gets the URL of the jimage file //IBM-shared_classes_misc
*/ //IBM-shared_classes_misc
private static void setJimageURL() { //IBM-shared_classes_misc
String javaHome = AccessController.doPrivileged((PrivilegedAction<String>) () -> { //IBM-shared_classes_misc
return System.getProperty("java.home"); //IBM-shared_classes_misc
/* //IBM-shared_classes_misc
* Lambda expression can't be used here due to bootstrap problem //IBM-shared_classes_misc
* when jdk.internal.lambda.dumpProxyClasses is enabled. //IBM-shared_classes_misc
* More details are at https://github.com/eclipse/openj9/issues/3399 //IBM-shared_classes_misc
*/ //IBM-shared_classes_misc
String javaHome = AccessController.doPrivileged( new PrivilegedAction<String>() { //IBM-shared_classes_misc
public String run() { //IBM-shared_classes_misc
return System.getProperty("java.home"); //IBM-shared_classes_misc
} //IBM-shared_classes_misc
}); //IBM-shared_classes_misc
Path p = Paths.get(javaHome, "lib", "modules"); //IBM-shared_classes_misc
if (Files.isRegularFile(p)) { //IBM-shared_classes_misc
Expand Down