On Tue, 26 Sep 2023 08:59:21 GMT, Kevin Walls <kev...@openjdk.org> wrote:

>> src/jdk.management/windows/native/libmanagement_ext/OperatingSystemImpl.c 
>> line 780:
>> 
>>> 778:     int currentQueryIndex = currentQueryIndexForProcess();
>>> 779: 
>>> 780:     assert(currentQueryIndex < numberOfJavaProcessesAtInitialization);
>> 
>> doesn't it make sense to change assert to currentQueryIndex >= -1, so any 
>> other negative numbers are still hit assertion?
>
> Thanks Leonid, I didn't see much value in that - we can see in the same file 
> the return value of currentQueryIndexForProcess() is going to be -1 or an 
> index from the for loop iteration from 0 to INT_MAX.
> We can do that if you really feel it has a benefit?

Fine then. Thank you for the explanation.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/15750#discussion_r1337521726

Reply via email to