Adapt OutputProcessor to retrieve reader from shell
PATCH 1/1 Adapt OutputProcessor to retrieve reader from shell
- adapt code to use IHostShell interface modifyied locally in order to retrieve the same underlying error and output stream
Signed-off-by Ioana Grigoropol <[email protected]>
--- .../org/yocto/remote/utils/OutputProcessor.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-)
plugins/org.yocto.remote.utils/src/org/yocto/remote/utils/OutputProcessor.java +2 -8
@@ -49,14 +49,8 @@ public abstract class OutputProcessor{ BufferedReader inbr = null; BufferedReader errbr = null; - if (hostShell instanceof LocalHostShell) { - inbr = ((LocalHostShell)hostShell).getReader(false); - errbr = ((LocalHostShell)hostShell).getReader(true); - } else { - Process p = new HostShellProcessAdapter(hostShell); - inbr = new BufferedReader(new InputStreamReader(p.getInputStream())); - errbr = new BufferedReader(new InputStreamReader(p.getErrorStream())); - } + inbr = hostShell.getReader(false); + errbr = hostShell.getReader(true); boolean cancel = false; while (!cancel) { if(monitor.isCanceled()) {
Signature · 1 line
1.7.9.5