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:
Shu Lei
2007-12-13 01:49:15 +00:00
parent 9d728af4a6
commit 976c405033

View File

@@ -93,12 +93,14 @@ public class ClientConnectionTask implements Runnable, DebugEventListener {
debugSupport.disconnect(1);
} finally {
try {
redirectOutputStream.close();
} catch (IOException ignore) {}
if (redirectOutputStream != null) {
try {
redirectOutputStream.close();
} catch (IOException ignore) {}
// restore the print output
BaseLib.restoreStandardOutput();
// restore the print output
BaseLib.restoreStandardOutput();
}
dispose();
}