Skip to content

Commit d122cb3

Browse files
committed
8355453: nsk.share.jdi.Debugee.waitingEvent() does not timeout properly
Backport-of: 486acc06e0325d247a96df8f7fc88c9111c3315d
1 parent 6ace78c commit d122cb3

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

test/hotspot/jtreg/vmTestbase/nsk/share/jdi/Debugee.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2001, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -434,8 +434,7 @@ public void setDebugTraceMode(int traceMode) {
434434
/**
435435
* Wait for the requested event and skip other events.
436436
*
437-
* @param request non-null value for events generated by this
438-
* event request; null value for <code>VMStartEvent</code>.
437+
* @param request non-null value for events generated by this event request;
439438
* @param timeout timeout in milliseconds to wait for the requested event.
440439
*
441440
* @throws InterruptedException if another thread has interrupted this thread
@@ -458,7 +457,7 @@ public Event waitingEvent(EventRequest request, long timeout)
458457

459458
EventSet eventSet = eventQueue.remove(timeLeft);
460459
if (eventSet == null) {
461-
continue;
460+
return null;
462461
}
463462

464463
EventIterator eventIterator = eventSet.eventIterator();

0 commit comments

Comments
 (0)