diff options
author | Noel Grandin <noel@peralex.com> | 2016-01-12 15:27:41 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-03-14 13:44:39 +0200 |
commit | b9d63d49be66ed1bfc4a76924f1c52ec3630adc8 (patch) | |
tree | 3c1f0cb02452d23bed03cbbc908e580b285da55a /qadevOOo/runner/helper/ProcessHandler.java | |
parent | 8353667d35bc511378c9b14261b6bb11b7bd56aa (diff) |
remove some unused Java code
found by UCDetector
Change-Id: Ic0295a24b26e206eb53eda2da540755477df86df
Diffstat (limited to 'qadevOOo/runner/helper/ProcessHandler.java')
-rw-r--r-- | qadevOOo/runner/helper/ProcessHandler.java | 79 |
1 files changed, 1 insertions, 78 deletions
diff --git a/qadevOOo/runner/helper/ProcessHandler.java b/qadevOOo/runner/helper/ProcessHandler.java index 60b31b09b34e..cd4902158205 100644 --- a/qadevOOo/runner/helper/ProcessHandler.java +++ b/qadevOOo/runner/helper/ProcessHandler.java @@ -120,10 +120,8 @@ public class ProcessHandler private boolean isStarted = false; private long mTimeOut = 0; private Pump stdout = null; - private Pump stderr = null; private PrintStream stdIn = null; private Process m_aProcess = null; - private TestParameters param = null; private boolean debug = false; private boolean bUseOutput = true; @@ -212,7 +210,6 @@ public class ProcessHandler { this(null, log, workDir, null, 0); this.cmdLineArray = commands; - this.param = param; if (shortWait != 0) { this.mTimeOut = shortWait; @@ -226,62 +223,6 @@ public class ProcessHandler } /** - * This method do an asynchronous execution of the commands. To avoid a interruption on long running processes - * caused by <CODE>OfficeWatcher</CODE>, the OfficeWatcher get frequently a ping. - * @see helper.OfficeWatcher - */ - public void runCommand() - { - - boolean changedText = true; - String memText = ""; - - this.executeAsynchronously(); - - OfficeWatcher ow = null; - if (param != null) - { - ow = (OfficeWatcher) param.get(PropertyName.OFFICE_WATCHER); - } - if (ow != null) - { - ow.ping(); - } - - int hangcheck = 10; - while (!this.isFinished() && changedText) - { - waitFor(2000, false); // wait but don't kill - - if (ow != null) - { - ow.ping(); - } - // check for changes in the output stream. If there are no changes, the process maybe hangs - if (!this.isFinished()) - { - hangcheck--; - if (hangcheck < 0) - { - String sOutputText = getOutputText(); - if (sOutputText.length() == memText.length()) - { - changedText = false; - } - hangcheck = 10; - memText = this.getOutputText(); - } - } - } - - if (!this.isFinished()) - { - dbg("runCommand Process is not finished but there are no changes in output stream."); - this.kill(); - } - } - - /** * Executes the command and returns only when the process * exits. * @@ -417,7 +358,7 @@ public class ProcessHandler } dbg("execute: pump io-streams"); stdout = new Pump(m_aProcess.getInputStream(), log, "out > ", bUseOutput); - stderr = new Pump(m_aProcess.getErrorStream(), log, "err > ", bUseOutput); + new Pump(m_aProcess.getErrorStream(), log, "err > ", bUseOutput); stdIn = new PrintStream(m_aProcess.getOutputStream()); dbg("execute: flush io-streams"); @@ -549,24 +490,6 @@ public class ProcessHandler } /** - * Returns the text output by external command to stderr. - * @return the text output by external command to stderr - */ - public String getErrorText() - { - if (stderr == null) - { - return ""; - } - else - { - return stderr.getStringBuffer(); - } - } - - - - /** * Returns information about was the command started or * not. * |