RFR: 8344332: (bf) Migrate DirectByteBuffer away from jdk.internal.ref.Cleaner [v2]
Kim Barrett
kbarrett at openjdk.org
Mon May 19 20:36:51 UTC 2025
On Mon, 19 May 2025 19:27:27 GMT, Roger Riggs <rriggs at openjdk.org> wrote:
>> Kim Barrett has updated the pull request incrementally with one additional commit since the last revision:
>>
>> move jdk.internal.nio.Cleaner to sun.nio
>
> src/java.base/share/classes/sun/nio/Cleaner.java line 31:
>
>> 29: * {@code Cleaner} represents an object and a cleaning action.
>> 30: */
>> 31: public interface Cleaner {
>
> Can this be renamed NIOCleaner or NIOBufClenaer or something to avoid the ambiguity between the other cleaner.
I intentionally (re)used the "Cleaner" name to avoid a bunch of renames that
would increase the size of the change and distract from the meat of it. I
think the name to use might be affected by how the implementation of the set
of cleanup objects might get merged between the new java.nio.BufferCleaner and
java.lang.ref.Cleaner. Perhaps the java.lang.ref.Cleaner.Cleanable interface
should be used throughout? I didn't want to expand this change to include
those kinds of questions.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25289#discussion_r2096448999
More information about the core-libs-dev
mailing list