JDK-8259869 : [macOS] Remove desktop module dependencies on JNF Reference APIs
  • Type: Bug
  • Component: client-libs
  • Affected Version: 17
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-01-17
  • Updated: 2025-01-16
  • Resolved: 2021-01-22
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 13 JDK 15 JDK 17
11.0.12-oracleFixed 13.0.8Fixed 15.0.4Fixed 17 b07Fixed
Related Reports
Relates :  
Description
JNF has a number of APIs that deal with JNI References :

These : which add no value to the direct JNI call and can be directly replaced
JNFNewGlobalRef
JNFDeleteGlobalRef
JNFNewWeakGlobalRef
JNFDeleteWeakGlobalRef

And these which just require a bit of extra handling because they create Cocoa class instances that will ensure the Java Refs are cleared when the carrier object is freed. 
JNFJObjectWrapper
JNFWeakJObjectWrapper

There seem to be simpler ways to free all the cases we have.
Comments
Fix request (11u) This is the part 5 of series, to remove JNF dependency from jdk11u. Applies almost cleanly. Also needed for parity with oracle. Review link https://mail.openjdk.java.net/pipermail/jdk-updates-dev/2021-May/006232.html
18-05-2021

Fix request (13u) : This is part 6/8 of JNF removal patches, applies cleanly.
08-04-2021

Fix request (15u) : This is part 6/8 of JNF removal patches, applies cleanly.
02-04-2021

Changeset: 92c2f084 Author: Phil Race <prr@openjdk.org> Date: 2021-01-22 01:50:00 +0000 URL: https://git.openjdk.java.net/jdk/commit/92c2f084
22-01-2021