> This replaces all `JNI_VERSION` version strings with `JNI_VERSION_1_8`.
> All of JavaFX is `JNI_VERSION_1_8` now.
>
> - Tested with JLink+JPackage (with and without JMods)
> - Tested with GraalVM (newest version 25)
>
> Sometimes this allowed to replace code that was always built like this:
>
>
> #ifdef JNI_VERSION_1_8
> //min. returned JNI_VERSION required by JDK8 for builtin libraries
> JNIEnv *env;
> if ((*vm)->GetEnv(vm, (void **)&env, JNI_VERSION_1_8) != JNI_OK) {
> return JNI_VERSION_1_4;
> }
> ...
>
>
> with:
>
> return JNI_VERSION_1_8;
>
>
> **Question -> Will do as Follow-up**
>
> ~There are a few locations where we have the following pattern;~
>
> if (jvm->GetEnv((void **)&env, JNI_VERSION_1_8)) {
> return JNI_ERR; /* JNI version not supported */
> }
>
> ~which should not happen anymore, right?
> Most of the code locations do not have this check and just do:~
>
> jvm->GetEnv(&env, JNI_VERSION_1_8);
>
> ~Should I follow that pattern for the few locations left?~
>
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK
> Interim AI Policy](https://openjdk.org/legal/ai).
Marius Hanl has updated the pull request with a new target base due to a merge
or a rebase. The incremental webrev excludes the unrelated changes brought in
by the merge/rebase. The pull request contains two additional commits since the
last revision:
- Merge branch 'master' of https://github.com/openjdk/jfx into
JDK-8385270-Bump-JNI_VERSION-to-1.8-everywhere
- 8385270: Bump JNI_VERSION to 1.8 everywhere
-------------
Changes:
- all: https://git.openjdk.org/jfx/pull/2175/files
- new: https://git.openjdk.org/jfx/pull/2175/files/1928644b..6ea68250
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jfx&pr=2175&range=01
- incr: https://webrevs.openjdk.org/?repo=jfx&pr=2175&range=00-01
Stats: 30369 lines in 341 files changed: 14256 ins; 3319 del; 12794 mod
Patch: https://git.openjdk.org/jfx/pull/2175.diff
Fetch: git fetch https://git.openjdk.org/jfx.git pull/2175/head:pull/2175
PR: https://git.openjdk.org/jfx/pull/2175