mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 19:14:38 +02:00
8144906: Fix jshell's ToolBasicTest
Various fixes to fix the ToolBasicTest - line endings normalization, ordering for output from RemoteAgent, synchronization. Reviewed-by: rfield
This commit is contained in:
parent
05799f8d81
commit
1ee440e9bc
5 changed files with 220 additions and 20 deletions
|
@ -133,7 +133,7 @@ class JDIConnection {
|
|||
return vm;
|
||||
}
|
||||
|
||||
boolean setConnectorArg(String name, String value) {
|
||||
synchronized boolean setConnectorArg(String name, String value) {
|
||||
/*
|
||||
* Too late if the connection already made
|
||||
*/
|
||||
|
@ -165,7 +165,7 @@ class JDIConnection {
|
|||
}
|
||||
}
|
||||
|
||||
boolean isOpen() {
|
||||
synchronized boolean isOpen() {
|
||||
return (vm != null);
|
||||
}
|
||||
|
||||
|
@ -173,13 +173,17 @@ class JDIConnection {
|
|||
return (connector instanceof LaunchingConnector);
|
||||
}
|
||||
|
||||
public void disposeVM() {
|
||||
synchronized boolean isRunning() {
|
||||
return process != null && process.isAlive();
|
||||
}
|
||||
|
||||
public synchronized void disposeVM() {
|
||||
try {
|
||||
if (vm != null) {
|
||||
vm.dispose(); // This could NPE, so it is caught below
|
||||
vm = null;
|
||||
}
|
||||
} catch (VMDisconnectedException | NullPointerException ex) {
|
||||
} catch (VMDisconnectedException ex) {
|
||||
// Ignore if already closed
|
||||
} finally {
|
||||
if (process != null) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue