-
Notifications
You must be signed in to change notification settings - Fork 738
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 support for JNI_VERSION_10 #1942
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change looks fine with respect to adding new constants. The only concern I have is that the code allows using newer JNI constants with older vms.
runtime/vm/jnimisc.cpp
Outdated
if (J2SE_VERSION(vm) >= J2SE_19) { | ||
if (J2SE_VERSION(vm) >= J2SE_V10) { | ||
return JNI_VERSION_10; | ||
} else if (J2SE_VERSION(vm) >= J2SE_19) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be == now that there's a new constant for 10?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the result should be the same. I will add the == in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only concern I have is that the code allows using newer JNI constants with older vms.
@DanHeidinga do you mean for versions below 1.8?
Signed-off-by: Theresa Mammarella <Theresa.T.Mammarella@ibm.com>
The existing supported / valid version checks allow JDK 8 to use Not something that needs to be addressed in this PR but its a possible future cleanup task |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Jenkins test sanity plinux jdk10 |
Agreed. I don't think its that easy to fix entirely because not all the code doing the checking knows which version is running. Although I think a subset of the cases could be fixed if we used BFUjavaVM in JVM_IsSupportedJNIVersion() |
and JNI_GetDefaultJavaVMInitArgs() |
The best place to fix is jniVersionIsValid(), and most places have a J9JavaVM that could be passed along. Its problematic for the initial call in J9_CreateJavaVM(), but we could allow all versions from there. Created #1944 for follow up. |
Testing passed but may be having an issue reporting back because eclipse ci was down. |
Signed-off-by: Theresa Mammarella Theresa.T.Mammarella@ibm.com
@pshipton