RFR: 8304718: GetIntArrayElements should not be passed JNI_FALSE

Julian Waters jwaters at openjdk.org
Wed Mar 22 14:28:35 UTC 2023


AWT passes JNI_FALSE to the JVM to avoid a copy, which is not correct since JNI has absolutely no control over whether a copy is made or not. The parameter in question is a pointer to a jboolean that the JVM sets to indicate whether it made a copy or not, which should be passed nullptr because we don't bother about the copy status of the jint

-------------

Commit messages:
 - GetIntArrayElements should not be passed JNI_FALSE

Changes: https://git.openjdk.org/jdk/pull/13140/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=13140&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8304718
  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/13140.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/13140/head:pull/13140

PR: https://git.openjdk.org/jdk/pull/13140



More information about the client-libs-dev mailing list