summaryrefslogtreecommitdiff
path: root/qadevOOo
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2017-01-16 16:41:53 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-01-17 06:42:52 +0000
commit10cb59eb914ba722c203242272de244d795a51e8 (patch)
treee5f6e613bb2adbc3862ca7542ba2544c7c3d3e26 /qadevOOo
parent2b458b67ebc3c3291f003f667480a1ccf376637d (diff)
remove some unused Java code
Change-Id: Ia1663256fc0b92c343ea4ba55a821c969077a0aa Reviewed-on: https://gerrit.libreoffice.org/33174 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'qadevOOo')
-rw-r--r--qadevOOo/runner/helper/ProcessHandler.java83
1 files changed, 2 insertions, 81 deletions
diff --git a/qadevOOo/runner/helper/ProcessHandler.java b/qadevOOo/runner/helper/ProcessHandler.java
index cd4902158205..4ba1b5d0586f 100644
--- a/qadevOOo/runner/helper/ProcessHandler.java
+++ b/qadevOOo/runner/helper/ProcessHandler.java
@@ -118,7 +118,6 @@ public class ProcessHandler
private int exitValue = -1;
private boolean isFinished = false;
private boolean isStarted = false;
- private long mTimeOut = 0;
private Pump stdout = null;
private PrintStream stdIn = null;
private Process m_aProcess = null;
@@ -129,23 +128,13 @@ public class ProcessHandler
private ProcessWatcher m_aWatcher;
/**
- * Creates instance with specified external command.
- * Debug info and output
- * of external command is printed to stdout.
- */
- public ProcessHandler(String cmdLine)
- {
- this(cmdLine, null, null, null, 0);
- }
-
- /**
* Creates instance with specified external command and
* log stream where debug info and output
* of external command is printed out.
*/
public ProcessHandler(String cmdLine, PrintWriter log)
{
- this(cmdLine, log, null, null, 0);
+ this(cmdLine, log, null, null);
}
/**
@@ -171,12 +160,8 @@ public class ProcessHandler
* timeOut = 0
* Waits for the process to end regulary
*
- * timeOut < 0
- * Kills the process immediately
- *
- *
*/
- private ProcessHandler(String cmdLine, PrintWriter log, File workDir, String[] envVars, long timeOut)
+ private ProcessHandler(String cmdLine, PrintWriter log, File workDir, String[] envVars)
{
this.cmdLine = cmdLine;
this.workDir = workDir;
@@ -191,49 +176,6 @@ public class ProcessHandler
{
this.log = log;
}
- this.mTimeOut = timeOut;
- }
-
- /**
- * Creates instance with specified external command which
- * will be executed in the some work directory and
- * log stream where debug info and output of external command is printed.
- * If log stream is null, logging is printed to stdout.
- * From the <CODE>TestParameters</CODE> the <CODE>OfficeWachter</CODE> get a ping.
- * @param shortWait If this parameter is true the <CODE>mTimeOut</CODE> is set to 5000 ms, else it is set to
- * half of time out from parameter timeout.
- * @param param the TestParameters
- * @see lib.TestParameters
- * @see helper.OfficeWatcher
- */
- public ProcessHandler(String[] commands, PrintWriter log, File workDir, int shortWait, TestParameters param)
- {
- this(null, log, workDir, null, 0);
- this.cmdLineArray = commands;
- if (shortWait != 0)
- {
- this.mTimeOut = shortWait;
- }
- else
- {
- this.mTimeOut = (long) (param.getInt(PropertyName.TIME_OUT) / 1.3);
- }
- debug = param.getBool(PropertyName.DEBUG_IS_ACTIVE);
-
- }
-
- /**
- * Executes the command and returns only when the process
- * exits.
- *
- * @return <code>true</code> if process was successfully
- * started and correctly exits (exit code doesn't affect
- * to this result).
- */
- public boolean executeSynchronously()
- {
- execute();
- return waitFor(mTimeOut);
}
/**
@@ -474,22 +416,6 @@ public class ProcessHandler
}
/**
- * Returns the text output by external command to stdout.
- * @return the text output by external command to stdout
- */
- public String getOutputText()
- {
- if (stdout == null)
- {
- return "";
- }
- else
- {
- return stdout.getStringBuffer();
- }
- }
-
- /**
* Returns information about was the command started or
* not.
*
@@ -540,11 +466,6 @@ public class ProcessHandler
}
}
- public void noOutput()
- {
- bUseOutput = false;
- }
-
private static class ProcessWatcher extends Thread
{