On Sat, 7 Nov 2020 17:11:42 GMT, Daniel D. Daugherty <[email protected]> wrote:
>> src/hotspot/share/runtime/synchronizer.cpp line 94:
>>
>>> 92: // Find next live ObjectMonitor.
>>> 93: ObjectMonitor* next = m;
>>> 94: while (next != NULL && next->is_being_async_deflated()) {
>>
>> Nit: This loop seems odd. Given we know m is_being_async_deflated, this
>> should either be a do/while loop, or else we should initialize:
>>
>> ObjectMonitor* next = m->next_om();
>>
>> and dispense with the awkwardly named next_next.
>
> @fisk - I'm leaving this one for you for now.
Changing it to a do/while loop makes sense. The while condition is always true
the first iteration, so doing a while or do/while loop is equivalent. If you
find the do/while loop easier to read, then that sounds good to me.
-------------
PR: https://git.openjdk.java.net/jdk/pull/642