changeset 54883:b5d45c2fe8a0

8218754: JDK-8068225 regression in JDIBreakpointTest Reviewed-by: cjplummer, sspitsyn
author gadams
date Tue, 12 Feb 2019 15:19:25 -0500
parents d667de4734ac
children cb1642ccc732
files test/hotspot/jtreg/vmTestbase/vm/mlvm/share/jdi/JDIBreakpointTest.java
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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;