Skip to content

Commit e707ea3

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

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
@@ -437,8 +437,7 @@ public void setDebugTraceMode(int traceMode) {
437437
/**
438438
* Wait for the requested event and skip other events.
439439
*
440-
* @param request non-null value for events generated by this
441-
* event request; null value for <code>VMStartEvent</code>.
440+
* @param request non-null value for events generated by this event request;
442441
* @param timeout timeout in milliseconds to wait for the requested event.
443442
*
444443
* @throws InterruptedException if another thread has interrupted this thread
@@ -461,7 +460,7 @@ public Event waitingEvent(EventRequest request, long timeout)
461460

462461
EventSet eventSet = eventQueue.remove(timeLeft);
463462
if (eventSet == null) {
464-
continue;
463+
return null;
465464
}
466465

467466
EventIterator eventIterator = eventSet.eventIterator();

0 commit comments

Comments
 (0)