RFR: 8344332: (bf) Migrate DirectByteBuffer away from jdk.internal.ref.Cleaner [v6]

Kim Barrett kbarrett at openjdk.org
Sun Jun 29 18:37:43 UTC 2025


On Fri, 27 Jun 2025 18:24:46 GMT, Brent Christian <bchristi at openjdk.org> wrote:

>> Kim Barrett has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 11 additional commits since the last revision:
>> 
>>  - Merge branch 'master' into direct-buffer-cleaner
>>  - Merge branch 'master' into direct-buffer-cleaner
>>  - Merge branch 'master' into direct-buffer-cleaner
>>  - Merge branch 'master' into direct-buffer-cleaner
>>  - add description of BufferCleaner class
>>  - exception handling in cleaner for backward consistency
>>  - detabify
>>  - move jdk.internal.nio.Cleaner to sun.nio
>>  - copyrights
>>  - remove java.nio use of jdk.internal.ref.Cleaner
>>  - ... and 1 more: https://git.openjdk.org/jdk/compare/e8e0f0b9...c995d97e
>
> src/java.base/share/classes/java/nio/Bits.java line 202:
> 
>> 200:         throws InterruptedException
>> 201:     {
>> 202:         JavaLangRefAccess jlra = SharedSecrets.getJavaLangRefAccess();
> 
> Is it better to have `jlra` here, as a local, versus where it was as a constant?

I think it doesn't matter, and this puts it close to where it's used.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/25289#discussion_r2173854794


More information about the nio-dev mailing list