1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 18:26:01 +02:00

Bug 478858 - TelnetProtocol#run() remove null pointer occurrences.

When terminating command shell some I/O stream might be null.

Change-Id: I03ed30f7869f499fb4b62b978d689ffb99b1eac4
Signed-off-by: Wainer dos Santos Moschetta <wainersm@linux.vnet.ibm.com>
This commit is contained in:
Wainer dos Santos Moschetta 2015-10-01 19:12:26 -03:00
parent 58c1857c15
commit babd6e8db0

View file

@ -359,17 +359,23 @@ public class TelnetProtocol extends Thread implements TelnetCodes {
// Tell the command shell that we have terminated
shell.terminated();
try {
if(inputChannel != null) {
inputChannel.close();
}
} catch (IOException ioe) {
/* ignore */
}
try {
if(serverOutputStream != null) {
serverOutputStream.close();
}
} catch (IOException ioe) {
/* ignore */
}
try {
if(clientOutputStream != null) {
clientOutputStream.close();
}
} catch (IOException ioe) {
/* ignore */
}