[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-serviceability-dev
Subject:    Re: jmx-dev RFR: 8214545: sun/management/jmxremote/bootstrap tests hang in revokeall.exe on Windows
From:       Boris Ulasevich <boris.ulasevich () bell-sw ! com>
Date:       2019-05-20 10:52:32
Message-ID: fcd7f823-8331-3cf0-9f4d-190d6cd514e1 () bell-sw ! com
[Download RAW message or body]



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
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic