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

Kim Barrett kbarrett at openjdk.org
Tue May 20 09:34:51 UTC 2025


On Mon, 19 May 2025 19:08:31 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/java/nio/Bits.java line 170:
> 
>> 168:             // without it that test likely fails.  Since failure here
>> 169:             // ends in OOME, there's no need to hurry.
>> 170:             for (int sleeps = 0; true; ) {
> 
> More typical coding pattern in openjdk code.  Here and elsewhere in this PR.
> Suggestion:
> 
>             while (true) {
>                 int sleeps = 0;

That's not the same thing, and doesn't do what's needed here.  Perhaps you meant

int sleeps = 0;
while (true) {

I like limiting the scope of the variable.  Is that a suggestion or a request to change?

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

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


More information about the core-libs-dev mailing list