summaryrefslogtreecommitdiff
path: root/qadevOOo
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-12-17 11:12:02 +0200
committerNoel Grandin <noel@peralex.com>2014-12-19 10:41:57 +0200
commitce3e78b6a0add1e1d2c3b5ca8ebca643d9c232d0 (patch)
tree893857c6ae82fc1af2c64349f0c04b92a6ffd0d2 /qadevOOo
parent35da4ec559ac29d51db88661ff0712b7782ade0b (diff)
java: dead code
Change-Id: Ief2bf7d3e98186a2268b873c4c5f7114057bd10f
Diffstat (limited to 'qadevOOo')
-rw-r--r--qadevOOo/runner/helper/ProcessHandler.java54
1 files changed, 2 insertions, 52 deletions
diff --git a/qadevOOo/runner/helper/ProcessHandler.java b/qadevOOo/runner/helper/ProcessHandler.java
index 0057e8970713..44962419a9f8 100644
--- a/qadevOOo/runner/helper/ProcessHandler.java
+++ b/qadevOOo/runner/helper/ProcessHandler.java
@@ -129,7 +129,6 @@ public class ProcessHandler
private boolean bUseOutput = true;
private int m_nProcessTimeout = 0;
- private String m_sProcessKiller;
private ProcessWatcher m_aWatcher;
/**
@@ -645,13 +644,11 @@ public class ProcessHandler
{
private int m_nTimeoutInSec;
- private final String m_sProcessToStart;
private final boolean m_bInterrupt;
- private ProcessWatcher(int _nTimeOut, String _sProcess)
+ private ProcessWatcher(int _nTimeOut)
{
m_nTimeoutInSec = _nTimeOut;
- m_sProcessToStart = _sProcess;
m_bInterrupt = false;
}
@@ -681,55 +678,8 @@ public class ProcessHandler
break;
}
}
- if (m_nTimeoutInSec <= 0 && !isInHoldOn()) // not zero, so we are interrupted.
- {
- system(m_sProcessToStart);
- }
}
- /**
- * Start an external Process
- * @param _sProcess
- */
- private void system(String _sProcess)
- {
- if (_sProcess == null)
- {
- return;
- }
-
- try
- {
-
- // run a _sProcess command
- // using the Runtime exec method:
- Process p = Runtime.getRuntime().exec(_sProcess);
-
- BufferedReader stdInput = new BufferedReader(new InputStreamReader(p.getInputStream()));
-
- BufferedReader stdError = new BufferedReader(new InputStreamReader(p.getErrorStream()));
-
- // read the output from the command
- String s;
- while ((s = stdInput.readLine()) != null)
- {
- System.out.println("out:" + s);
- }
-
- // read any errors from the attempted command
- while ((s = stdError.readLine()) != null)
- {
- System.out.println("err:" + s);
- }
-
- }
- catch (java.io.IOException e)
- {
- System.out.println("exception caught: ");
- e.printStackTrace();
- }
-
- }
}
/**
@@ -742,7 +692,7 @@ public class ProcessHandler
{
if (m_nProcessTimeout != 0)
{
- m_aWatcher = new ProcessWatcher(m_nProcessTimeout, m_sProcessKiller);
+ m_aWatcher = new ProcessWatcher(m_nProcessTimeout);
m_aWatcher.start();
}
}