On Wed, 5 May 2021 22:12:20 GMT, Alex Menkov <amen...@openjdk.org> wrote:
>> test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/hotswap/HotSwap.cpp line 110: >> >>> 108: } >>> 109: // use while instead of if to exit the block on error >>> 110: while (classCount < max_classes) { >> >> Could you please explain why this while is executed only once. It is not >> obvious. > > I tried to explain it in the comment :) > it should be "if (classCount < max_classes)", > but inside the if we have return statements and we need to do cleanup (exit > monitor). > So I used well-known pattern with 1-pass cycle (note that "return"s are > replaced with "break"s) Offline discussion shown that I forgot to add break at the end of the cycle. Will fix ------------- PR: https://git.openjdk.java.net/jdk/pull/3889