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

Chris Plummer cjplummer at openjdk.org
Fri Apr 25 06:17:38 UTC 2025


> 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

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/24839/files
  - new: https://git.openjdk.org/jdk/pull/24839/files/7fbefd22..6a7e79ed

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=24839&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24839&range=00-01

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/24839.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/24839/head:pull/24839

PR: https://git.openjdk.org/jdk/pull/24839


More information about the serviceability-dev mailing list