On 07/08/2016 09:10, Peter Levart wrote:

Hi, I've been planing to give a suggestion regarding internal Cleaner implementing Runnable interface. If this internal Cleaner in DBB ever gets replaced with public API in the form of java.lang.reflect.Cleanable implementation, then at that time, such workarrounds will break again and would have to be revised once more. So why wouldn't internal Cleaner rather implement java.lang.reflect.Cleanable instead of Runnable from day one of JDK 9 release?

The hack involves access to a private/undocumented field so it can never be guaranteed to work. But to your point, the internal Cleaner could implement java.lang.ref.Cleaner.Cleanable. This seems like something for core-libs-dev of course.

-Alan

Reply via email to