fix the NPE. When the vm cannot connect to the debug client/service, it would not create the redirectOutputStream. Hence, no need to call redirectOutputStream.close() and BaseLib.restoreStandardOutput.
This commit is contained in:
@@ -93,12 +93,14 @@ public class ClientConnectionTask implements Runnable, DebugEventListener {
|
||||
|
||||
debugSupport.disconnect(1);
|
||||
} finally {
|
||||
try {
|
||||
redirectOutputStream.close();
|
||||
} catch (IOException ignore) {}
|
||||
|
||||
// restore the print output
|
||||
BaseLib.restoreStandardOutput();
|
||||
if (redirectOutputStream != null) {
|
||||
try {
|
||||
redirectOutputStream.close();
|
||||
} catch (IOException ignore) {}
|
||||
|
||||
// restore the print output
|
||||
BaseLib.restoreStandardOutput();
|
||||
}
|
||||
|
||||
dispose();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user