RFR: 8344332: (bf) Migrate DirectByteBuffer away from jdk.internal.ref.Cleaner [v2]
Roger Riggs
rriggs at openjdk.org
Tue May 20 14:42:54 UTC 2025
On Tue, 20 May 2025 09:32:08 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
>> 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?
right, your form does better limit the scope of the loop, and is correct as is; (just looks unusual)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25289#discussion_r2098160773
More information about the core-libs-dev
mailing list