From cc0ce67a081b72ad401434e9b1a656f480974d4a Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 25 Sep 2020 12:04:51 +0200 Subject: remove unused code Change-Id: I131958be81d56730fee2f4939cf3b70489f7f6e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103385 Tested-by: Jenkins Reviewed-by: Noel Grandin --- qadevOOo/runner/helper/ProcessHandler.java | 68 ------------------------------ 1 file changed, 68 deletions(-) (limited to 'qadevOOo') diff --git a/qadevOOo/runner/helper/ProcessHandler.java b/qadevOOo/runner/helper/ProcessHandler.java index 49aba431a50e..84dbd77967d7 100644 --- a/qadevOOo/runner/helper/ProcessHandler.java +++ b/qadevOOo/runner/helper/ProcessHandler.java @@ -115,16 +115,12 @@ public class ProcessHandler private File workDir = null; private PrintWriter log; private int exitValue = -1; - private boolean isFinished = false; private boolean isStarted = false; private PrintStream stdIn = null; private Process m_aProcess = null; private boolean debug = false; private boolean bUseOutput = true; - private int m_nProcessTimeout = 0; - private ProcessWatcher m_aWatcher; - /** * Creates instance with specified external command and * log stream where debug info and output @@ -307,18 +303,6 @@ public class ProcessHandler return isStarted; } - /** - * Returns the information about the final state of command - * execution. - * - * @return true if the command correctly starts, - * exits and was not interrupted due to timeout. - */ - private boolean isFinished() - { - return isFinished; - } - /** * Returns exit code of the external command. * @@ -345,56 +329,4 @@ public class ProcessHandler log.println(utils.getDateTime() + "PH." + message); } } - - private static class ProcessWatcher extends Thread - { - - private int m_nTimeoutInSec; - private final boolean m_bInterrupt; - - private ProcessWatcher(int _nTimeOut) - { - m_nTimeoutInSec = _nTimeOut; - m_bInterrupt = false; - } - - /** - * returns true, if the thread should hold on - */ - public synchronized boolean isInHoldOn() - { - return m_bInterrupt; - } - @Override - public void run() - { - while (m_nTimeoutInSec > 0) - { - m_nTimeoutInSec--; - util.utils.pause(1000); - if (isInHoldOn()) - { - break; - } - } - } - - } - - /** - * If the timeout only given by setProcessTimeout(int seconds) function is != 0, - * an extra thread is created and after time has run out, the ProcessKiller string - * given by function setProcessKiller(string) will execute. - * So it is possible to kill a running office after a given time of seconds. - */ - private void initializeProcessKiller() - { - if (m_nProcessTimeout != 0) - { - m_aWatcher = new ProcessWatcher(m_nProcessTimeout); - m_aWatcher.start(); - } - } - - } -- cgit v1.2.3