mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-15 21:15:23 +02:00
[196301] check that the remote encoding isn't null before using it
This commit is contained in:
parent
738e9d77be
commit
cb211e9fba
1 changed files with 9 additions and 1 deletions
|
@ -14,6 +14,7 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - Adapted from LocalHostShell.
|
* Martin Oberhuber (Wind River) - Adapted from LocalHostShell.
|
||||||
* David McKnight (IBM) - [191599] Use the remote encoding specified in the host property page
|
* David McKnight (IBM) - [191599] Use the remote encoding specified in the host property page
|
||||||
|
* David McKnight (IBM) - [196301] Check that the remote encoding isn't null before using it
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.services.ssh.shell;
|
package org.eclipse.rse.internal.services.ssh.shell;
|
||||||
|
@ -81,7 +82,14 @@ public class SshHostShell extends AbstractHostShell implements IHostShell {
|
||||||
((ChannelShell)fChannel).setEnv(envTable);
|
((ChannelShell)fChannel).setEnv(envTable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (encoding != null)
|
||||||
|
{
|
||||||
fStdoutHandler = new SshShellOutputReader(this, new BufferedReader(new InputStreamReader(fChannel.getInputStream(), encoding)), false);
|
fStdoutHandler = new SshShellOutputReader(this, new BufferedReader(new InputStreamReader(fChannel.getInputStream(), encoding)), false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fStdoutHandler = new SshShellOutputReader(this, new BufferedReader(new InputStreamReader(fChannel.getInputStream())), false);
|
||||||
|
}
|
||||||
fStderrHandler = new SshShellOutputReader(this, null,true);
|
fStderrHandler = new SshShellOutputReader(this, null,true);
|
||||||
OutputStream outputStream = fChannel.getOutputStream();
|
OutputStream outputStream = fChannel.getOutputStream();
|
||||||
//TODO check if encoding or command to execute needs to be considered
|
//TODO check if encoding or command to execute needs to be considered
|
||||||
|
|
Loading…
Add table
Reference in a new issue