JDK-8362572 : Delete the usage of "sun.java2d.reftype" from the sun.java2d.Disposer
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 25
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2025-07-18
  • Updated: 2025-07-25
  • Resolved: 2025-07-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 26
26 b08Fixed
Related Reports
Relates :  
Description
The class sun.java2d.Disposer can use either weak or phantom references. For many years it has used phantom references by default.

One reason why weak references were supported is because phantom references keep a strong reference to the object until the reference is added to the reference queue and cleared. However, weak references were not used by default because they could be cleared before the finalizer of the object finished running.

This behavior changed after the fix for JDK-8071507. Now both weak and phantom references behave the same way when it comes to clearing the reference to the object.

Because of this, we can remove the implementation that uses weak references. This will make the code simpler and reduce the number of paths we need to test.
Comments
Changeset: 7d7d308d Branch: master Author: Sergey Bylokhov <serb@openjdk.org> Date: 2025-07-22 00:38:28 +0000 URL: https://git.openjdk.org/jdk/commit/7d7d308d9ab6f06ebdab0f5967a5bfc007d4217f
22-07-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/26394 Date: 2025-07-18 19:07:19 +0000
21-07-2025