mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-15 16:44:36 +02:00
8145098: JNI GetVersion should return JNI_VERSION_9
Updated JNI_VERSION for current version to be JNI_VERSION_9 Reviewed-by: hseigel, gtriantafill, dholmes, alanb
This commit is contained in:
parent
b437ee835e
commit
b7658ef0b7
4 changed files with 7 additions and 5 deletions
|
@ -89,7 +89,7 @@
|
||||||
#include "jvmci/jvmciRuntime.hpp"
|
#include "jvmci/jvmciRuntime.hpp"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static jint CurrentVersion = JNI_VERSION_1_8;
|
static jint CurrentVersion = JNI_VERSION_9;
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
extern LONG WINAPI topLevelExceptionFilter(_EXCEPTION_POINTERS* );
|
extern LONG WINAPI topLevelExceptionFilter(_EXCEPTION_POINTERS* );
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -1952,6 +1952,7 @@ JNI_OnUnload(JavaVM *vm, void *reserved);
|
||||||
#define JNI_VERSION_1_4 0x00010004
|
#define JNI_VERSION_1_4 0x00010004
|
||||||
#define JNI_VERSION_1_6 0x00010006
|
#define JNI_VERSION_1_6 0x00010006
|
||||||
#define JNI_VERSION_1_8 0x00010008
|
#define JNI_VERSION_1_8 0x00010008
|
||||||
|
#define JNI_VERSION_9 0x00090000
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} /* extern "C" */
|
} /* extern "C" */
|
||||||
|
|
|
@ -4133,6 +4133,7 @@ jboolean Threads::is_supported_jni_version(jint version) {
|
||||||
if (version == JNI_VERSION_1_4) return JNI_TRUE;
|
if (version == JNI_VERSION_1_4) return JNI_TRUE;
|
||||||
if (version == JNI_VERSION_1_6) return JNI_TRUE;
|
if (version == JNI_VERSION_1_6) return JNI_TRUE;
|
||||||
if (version == JNI_VERSION_1_8) return JNI_TRUE;
|
if (version == JNI_VERSION_1_8) return JNI_TRUE;
|
||||||
|
if (version == JNI_VERSION_9) return JNI_TRUE;
|
||||||
return JNI_FALSE;
|
return JNI_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -27,12 +27,12 @@
|
||||||
*/
|
*/
|
||||||
public class JniVersion {
|
public class JniVersion {
|
||||||
|
|
||||||
public static final int JNI_VERSION_1_8 = 0x00010008;
|
public static final int JNI_VERSION_9 = 0x00090000;
|
||||||
|
|
||||||
public static void main(String... args) throws Exception {
|
public static void main(String... args) throws Exception {
|
||||||
System.loadLibrary("JniVersion");
|
System.loadLibrary("JniVersion");
|
||||||
int res = getJniVersion();
|
int res = getJniVersion();
|
||||||
if (res < JNI_VERSION_1_8) {
|
if (res != JNI_VERSION_9) {
|
||||||
throw new Exception("Unexpected value returned from getJniVersion(): 0x" + Integer.toHexString(res));
|
throw new Exception("Unexpected value returned from getJniVersion(): 0x" + Integer.toHexString(res));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue