JNI VERSION CHANGE: RFR: 8145098: JNI GetVersion should return JNI_VERSION_9

Daniel D. Daugherty daniel.daugherty at oracle.com
Thu Jan 28 18:37:10 UTC 2016


On 1/27/16 4:02 PM, Rachel Protacio wrote:
> Hello!
>
> Small but important change for review: updating the JNI_VERSION and in 
> so doing, changing the format from JNI_VERSION_1_x to JNI_VERSION_x_y 
> (see code/bug for details).
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8145098
>
> hotspot repo webrev: http://cr.openjdk.java.net/~rprotacio/JNI_hotspot/

src/share/vm/prims/jni.cpp
     No comments.

src/share/vm/prims/jni.h
     No comments.

src/share/vm/runtime/thread.cpp
     No comments.

test/native_sanity/JniVersion.java
     No comments.


> jdk repo webrev: http://cr.openjdk.java.net/~rprotacio/JNI_jdk/

src/java.base/share/native/include/jni.h
     No comments.

     Meta-comment not specific to this bug. It sure would be nice if
     finally had "one source of truth" for "jni.h" (and friends).
     Perhaps in the top-level repo... :-)


Thumbs up!

On Alan's comments about JNI_VERSION_9_0 versus JNI_VERSION_9, my
personal preference is for trailing zero version. There was recently
a comment on hotspot-dev at o.j.n and verona-dev at o.j.n about the missing
trailing zeros. Subject line is: Version special case '9'

http://mail.openjdk.java.net/pipermail/hotspot-dev/2016-January/021525.html

Dan


>
> I grep'ed through the code to find references to the current JNI 
> version and believe I have caught all the ones that needed changing, 
> plus the fact that all these tests pass:
>
>  * local hotspot jtreg tests
>  * my own sample JNI test to print and visually inspect the version
>    (essentially what is performed by the updated
>    hotspot/test/native_sanity/JniVersion.java test)
>  * jck vm tests
>  * local rbt colcated and noncolocated tests, especially for the
>    purpose of hitting tonga/src/nsk/share/jvmti tests where
>    JNI_GetVersion() is used
>
> Thank you,
> Rachel




More information about the core-libs-dev mailing list