jmx-dev RFR: 8214545: sun/management/jmxremote/bootstrap tests hang in revokeall.exe on Windows
Boris Ulasevich
boris.ulasevich at bell-sw.com
Mon May 20 10:52:32 UTC 2019
On 20.05.2019 13:13, Daniel Fuchs wrote:
> Hi,
>
> On 20/05/2019 01:43, David Holmes wrote:
>>> Webrev: http://cr.openjdk.java.net/~dtitov/8214545
>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8214545
>> The count-- is obvious as it is the loop counter, but it is far from
>> clear to me that i++ is correct. I don't fully understand the logic
>> but i is only incremented under very specific conditions. If you
>> rewrote the code to avoid the use of the continue then i would not be
>> modified except where it currently is.
>>
>
> Looks like `i` tries to count the entries that were not
> modified - so the fact that it was not incremented before
> `continue` looks like an oversight. I'd say that Daniil is
> right.
There is iterating over list and changing it same time. It is common to
iterate backward in such case to simplify logic. But this code is Ok for
me too.
> I believe Alan wrote that tool - he may be able to confirm ;-)
>
> That said - if we could do the same thing in java as Alan suggests
> and replace these shell scripts with java that might be a big
> win!
>
> best regards,
>
> -- daniel
More information about the serviceability-dev
mailing list