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 support for JNI_VERSION_10 #1942

Merged
merged 1 commit into from
May 19, 2018
Merged

Conversation

theresa-m
Copy link
Contributor

Signed-off-by: Theresa Mammarella Theresa.T.Mammarella@ibm.com

@pshipton

Copy link
Member

@DanHeidinga DanHeidinga left a 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.

if (J2SE_VERSION(vm) >= J2SE_19) {
if (J2SE_VERSION(vm) >= J2SE_V10) {
return JNI_VERSION_10;
} else if (J2SE_VERSION(vm) >= J2SE_19) {
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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>
@DanHeidinga
Copy link
Member

The only concern I have is that the code allows using newer JNI constants with older vms.

The existing supported / valid version checks allow JDK 8 to use JNI_VERSION_9. This change extends that to JNI_VERSION_10 as well.

Not something that needs to be addressed in this PR but its a possible future cleanup task

Copy link
Member

@DanHeidinga DanHeidinga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@DanHeidinga
Copy link
Member

Jenkins test sanity plinux jdk10

@DanHeidinga DanHeidinga self-assigned this May 18, 2018
@pshipton
Copy link
Member

its a possible future cleanup task

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()

@pshipton
Copy link
Member

and JNI_GetDefaultJavaVMInitArgs()

@pshipton
Copy link
Member

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.

@pshipton
Copy link
Member

Testing passed but may be having an issue reporting back because eclipse ci was down.

@pshipton pshipton merged commit 70e3e0e into eclipse-openj9:master May 19, 2018
@theresa-m theresa-m deleted the add_jni_10 branch June 5, 2018 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants