RFR: 8355453: nsk.share.jdi.Debugee.waitingEvent() does not timeout properly [v2]

Chris Plummer cjplummer at openjdk.org
Wed Apr 30 17:12:51 UTC 2025


On Fri, 25 Apr 2025 06:17:38 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:

>> nsk.share.jdi.Debugee.waitingEvent() takes a timeout argument. However, if the call to EventQueue.remove() times out and returns null, waitingEvent() just keep on retrying. The logic is incorrect for a null result. It should immediately return null. The retry path is only meant for filtering out other events, and it updates "timeLeft' before retrying to avoid endlessly repeating the loop. 
>> 
>> Tested by running all of nsk/jdi locally on linux-x64-debug
>
> Chris Plummer has updated the pull request incrementally with one additional commit since the last revision:
> 
>   return null instead of throwing an exception

Thank you for the reviews Leonid, Serguei, and Alex!

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

PR Comment: https://git.openjdk.org/jdk/pull/24839#issuecomment-2842683217


More information about the serviceability-dev mailing list