RFR: 8362572: Delete the usage of "sun.java2d.reftype" from the sun.java2d.Disposer
Sergey Bylokhov
serb at openjdk.org
Mon Jul 21 07:46:29 UTC 2025
Just a code cleanup to reduce the amount of code we need to care about, test, and support.
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. This behavior changed after the fix for [JDK-8071507](https://bugs.openjdk.org/browse/JDK-8071507). Now both weak and phantom references behave the same way when it comes to clearing the reference to the object.
-------------
Commit messages:
- 8362572: Delete the usage of "sun.java2d.reftype" from the sun.java2d.Disposer
Changes: https://git.openjdk.org/jdk/pull/26394/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26394&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8362572
Stats: 27 lines in 1 file changed: 2 ins; 21 del; 4 mod
Patch: https://git.openjdk.org/jdk/pull/26394.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/26394/head:pull/26394
PR: https://git.openjdk.org/jdk/pull/26394
More information about the client-libs-dev
mailing list