We don't need jdk.internal.ref.Cleaner any more

Peter Levart peter.levart at gmail.com
Sun Feb 7 10:53:54 UTC 2016


sun.misc.Cleaner has been moved to internal package jdk.internal.ref 
recently [1] to clean-up sun.misc namespace. But now that:

- we have comparable public API (java.lang.ref.Cleaner & Cleanable) [2]
- we have an internal shared java.lang.ref.Cleaner instance 
- sun.misc.Cleaner is not a special kind of Reference any more in the 
JVM [3]

...I think there's no reason to keep this special internal API any more. 
It can be replaced with public API.

I propose to remove jdk.internal.ref.Cleaner class and replace its 
usages with java.lang.ref.Cleaner and friends [4].

What do you say?

Regards, Peter

[1] https://bugs.openjdk.java.net/browse/JDK-8148117
[2] https://bugs.openjdk.java.net/browse/JDK-8138696
[3] https://bugs.openjdk.java.net/browse/JDK-8143847

More information about the core-libs-dev mailing list