On Thu, 18 Mar 2021 14:57:16 GMT, Chris Hegarty <che...@openjdk.org> wrote:

> 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

This pull request has now been integrated.

Changeset: 4d51a82b
Author:    Chris Hegarty <che...@openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/4d51a82b
Stats:     24 lines in 1 file changed: 18 ins; 0 del; 6 mod

8263818: Release JNI local references in get/set-InetXXAddress-member helper 
functions of net_util.c

Reviewed-by: alanb

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

PR: https://git.openjdk.java.net/jdk/pull/3074

Reply via email to