[yocto] [PATCH] Adapt OutputProcessor to retrieve reader from shell
Ioana Grigoropol
ioanax.grigoropol at intel.com
Thu Jun 13 07:20:57 PDT 2013
- adapt code to use IHostShell interface modifyied locally in order to retrieve the same underlying error and output stream
Signed-off-by: Ioana Grigoropol <ioanax.grigoropol at intel.com>
---
.../org/yocto/remote/utils/OutputProcessor.java | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/plugins/org.yocto.remote.utils/src/org/yocto/remote/utils/OutputProcessor.java b/plugins/org.yocto.remote.utils/src/org/yocto/remote/utils/OutputProcessor.java
index 401a782..04c04e1 100644
--- a/plugins/org.yocto.remote.utils/src/org/yocto/remote/utils/OutputProcessor.java
+++ b/plugins/org.yocto.remote.utils/src/org/yocto/remote/utils/OutputProcessor.java
@@ -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()) {
--
1.7.9.5
More information about the yocto
mailing list