8218754: JDK-8068225 regression in JDIBreakpointTest
authorgadams
Tue, 12 Feb 2019 15:19:25 -0500
changeset 53733 b5d45c2fe8a0
parent 53732 d667de4734ac
child 53734 cb1642ccc732
8218754: JDK-8068225 regression in JDIBreakpointTest Reviewed-by: cjplummer, sspitsyn
test/hotspot/jtreg/vmTestbase/vm/mlvm/share/jdi/JDIBreakpointTest.java
--- a/test/hotspot/jtreg/vmTestbase/vm/mlvm/share/jdi/JDIBreakpointTest.java	Tue Feb 12 11:23:43 2019 -0800
+++ b/test/hotspot/jtreg/vmTestbase/vm/mlvm/share/jdi/JDIBreakpointTest.java	Tue Feb 12 15:19:25 2019 -0500
@@ -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
@@ -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;
@@ -358,8 +359,12 @@
             }
         }.go();
 
-        if (!debuggee.terminated())
-            debuggee.endDebugee();
+        if (!debuggee.terminated()) {
+            try {
+                debuggee.dispose();
+            } catch (VMDisconnectedException ignore) {
+            }
+        }
 
         debuggee.waitFor();
         return true;