Skip to content

Commit

Permalink
8218754: JDK-8068225 regression in JDIBreakpointTest
Browse files Browse the repository at this point in the history
Backport-of: 5d0ff15
  • Loading branch information
Andrew Lu committed Dec 6, 2023
1 parent 04d2033 commit 1080258
Showing 1 changed file with 8 additions and 3 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -45,6 +45,7 @@
import com.sun.jdi.ThreadReference;
import com.sun.jdi.Value;
import com.sun.jdi.VirtualMachine;
import com.sun.jdi.VMDisconnectedException;
import com.sun.jdi.event.BreakpointEvent;
import com.sun.jdi.event.ClassPrepareEvent;
import com.sun.jdi.event.Event;
Expand Down Expand Up @@ -358,8 +359,12 @@ public boolean run() throws Throwable {
}
}.go();

if (!debuggee.terminated())
debuggee.endDebugee();
if (!debuggee.terminated()) {
try {
debuggee.dispose();
} catch (VMDisconnectedException ignore) {
}
}

debuggee.waitFor();
return true;
Expand Down

1 comment on commit 1080258

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.