From 10cb59eb914ba722c203242272de244d795a51e8 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 16 Jan 2017 16:41:53 +0200 Subject: remove some unused Java code Change-Id: Ia1663256fc0b92c343ea4ba55a821c969077a0aa Reviewed-on: https://gerrit.libreoffice.org/33174 Tested-by: Jenkins Reviewed-by: Noel Grandin --- qadevOOo/runner/helper/ProcessHandler.java | 83 +----------------------------- 1 file changed, 2 insertions(+), 81 deletions(-) (limited to 'qadevOOo/runner/helper') 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; @@ -128,16 +127,6 @@ public class ProcessHandler private int m_nProcessTimeout = 0; 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 @@ -145,7 +134,7 @@ public class ProcessHandler */ 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 TestParameters the OfficeWachter get a ping. - * @param shortWait If this parameter is true the mTimeOut 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 true if process was successfully - * started and correctly exits (exit code doesn't affect - * to this result). - */ - public boolean executeSynchronously() - { - execute(); - return waitFor(mTimeOut); } /** @@ -473,22 +415,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 { -- cgit v1.2.3