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
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion runtime/include/jni.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 1991, 2017 IBM Corp. and others
* Copyright (c) 1991, 2018 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -54,6 +54,7 @@ extern "C" {
#define JNI_VERSION_1_6 0x00010006
#define JNI_VERSION_1_8 0x00010008
#define JNI_VERSION_9 0x00090000
#define JNI_VERSION_10 0x000A0000

#define JVMEXT_VERSION_1_1 0x7E010001

Expand Down
3 changes: 2 additions & 1 deletion runtime/j9vm/j7vmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1648,7 +1648,7 @@ JVM_IsPrimitiveClass(JNIEnv* env, jclass clazz)
* This function may not lock, gc or throw exception.
* @param version
* @return true if version is JNI_VERSION_1_1, JNI_VERSION_1_2, JNI_VERSION_1_4, JNI_VERSION_1_6, or
* JNI_VERSION_1_8, JNI_VERSION_9; false if not.
* JNI_VERSION_1_8, JNI_VERSION_9, JNI_VERSION_10; false if not.
* @careful
*/
jboolean JNICALL
Expand All @@ -1661,6 +1661,7 @@ JVM_IsSupportedJNIVersion(jint version)
case JNI_VERSION_1_6:
case JNI_VERSION_1_8:
case JNI_VERSION_9:
case JNI_VERSION_10:
return JNI_TRUE;

default:
Expand Down
1 change: 1 addition & 0 deletions runtime/j9vm/jvm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2367,6 +2367,7 @@ jint JNICALL JNI_GetDefaultJavaVMInitArgs(void *vm_args) {
case JNI_VERSION_1_6:
case JNI_VERSION_1_8:
case JNI_VERSION_9:
case JNI_VERSION_10:
return JNI_OK;
}

Expand Down
1 change: 1 addition & 0 deletions runtime/redirector/redirector.c
Original file line number Diff line number Diff line change
Expand Up @@ -907,6 +907,7 @@ JNI_GetDefaultJavaVMInitArgs(void *vm_args)
|| (jniVersion == JNI_VERSION_1_6)
|| (jniVersion == JNI_VERSION_1_8)
|| (jniVersion == JNI_VERSION_9)
|| (jniVersion == JNI_VERSION_10)
) {
return JNI_OK;
} else {
Expand Down
4 changes: 3 additions & 1 deletion runtime/vm/jnimisc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,9 @@ getVersion(JNIEnv *env)
J9VMThread *currentThread = (J9VMThread*)env;
J9JavaVM *vm = currentThread->javaVM;

if (J2SE_VERSION(vm) >= J2SE_19) {
if (J2SE_VERSION(vm) >= J2SE_V10) {
return JNI_VERSION_10;
} else if (J2SE_VERSION(vm) == J2SE_19) {
return JNI_VERSION_9;
} else {
return JNI_VERSION_1_8;
Expand Down
5 changes: 3 additions & 2 deletions runtime/vm/jvminitcommon.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 1991, 2014 IBM Corp. and others
* Copyright (c) 1991, 2018 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -133,5 +133,6 @@ jniVersionIsValid(UDATA jniVersion)
|| (jniVersion == JNI_VERSION_1_4)
|| (jniVersion == JNI_VERSION_1_6)
|| (jniVersion == JNI_VERSION_1_8)
|| (jniVersion == JNI_VERSION_9);
|| (jniVersion == JNI_VERSION_9)
|| (jniVersion == JNI_VERSION_10);
}