As per the Java Native Interface Specification: "All Java objects returned by JNI functions are local references." [1].
The get/set-InetXXAddress-member helper functions in net_util.c retrieve a local reference to the internal `holder` before operating on the InetAddress object. These functions are used in many places by the native code, and should release any local references before returning. [1] https://docs.oracle.com/en/java/javase/16/docs/specs/jni/design.html#global-and-local-references ------------- Commit messages: - Initial changes Changes: https://git.openjdk.java.net/jdk/pull/3074/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=3074&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8263818 Stats: 24 lines in 1 file changed: 18 ins; 0 del; 6 mod Patch: https://git.openjdk.java.net/jdk/pull/3074.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/3074/head:pull/3074 PR: https://git.openjdk.java.net/jdk/pull/3074