summaryrefslogtreecommitdiff
path: root/qadevOOo/runner/helper/ProcessHandler.java
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-12-11 16:25:29 +0200
committerNoel Grandin <noelgrandin@gmail.com>2014-12-12 08:16:17 +0000
commit117a82cd090ddd8efbc500350dc6082730f04720 (patch)
tree50c07684d43c06fd54d17532caca6a3afafd6967 /qadevOOo/runner/helper/ProcessHandler.java
parent04b183a9bc792a53a9f081353a79486faa4f3872 (diff)
java: remove dead code in qadevOOo
found by running UCDetector over the code many times, like peeling an onion Change-Id: I54d5147eb1b5c921ad236331bc4c1f765b13ca83 Reviewed-on: https://gerrit.libreoffice.org/13445 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'qadevOOo/runner/helper/ProcessHandler.java')
-rw-r--r--qadevOOo/runner/helper/ProcessHandler.java134
1 files changed, 0 insertions, 134 deletions
diff --git a/qadevOOo/runner/helper/ProcessHandler.java b/qadevOOo/runner/helper/ProcessHandler.java
index 9e0b352e55eb..9105a86b673b 100644
--- a/qadevOOo/runner/helper/ProcessHandler.java
+++ b/qadevOOo/runner/helper/ProcessHandler.java
@@ -119,7 +119,6 @@ public class ProcessHandler
private int exitValue = -1;
private boolean isFinished = false;
private boolean isStarted = false;
- private boolean mbTimedOut = false;
private long mTimeOut = 0;
private String stdInBuff = "";
private Pump stdout = null;
@@ -145,57 +144,6 @@ public class ProcessHandler
}
/**
- * Creates instance with specified external command
- * including parameters as an array.
- * Debug info and output
- * of external command is printed to stdout.
- */
- public ProcessHandler(String[] cmdLines)
- {
- this(null, null, null, null, 0);
- cmdLineArray = cmdLines;
- }
-
- /**
- * Creates instance with specified external command
- * including parameters as an array, with environment
- * variables.
- * Debug info and output
- * of external command is printed to stdout.
- * @see java.lang.Runtime exec(String[], String[])
- */
- public ProcessHandler(String[] cmdLines, String[] envVars)
- {
- this(null, null, null, envVars, 0);
- cmdLineArray = cmdLines;
- }
-
- /**
- * Creates instance with specified external command
- * including parameters as an array, with environment
- * variables. The command will be started in workDir.
- * Debug info and output
- * of external command is printed to stdout.
- */
- public ProcessHandler(String[] cmdLines, File workDir)
- {
- this(null, null, workDir, null, 0);
- cmdLineArray = cmdLines;
-
- }
-
- /**
- * Creates instance with specified external command and
- * log stream where debug info and output
- * of external command is printed out. The command will be started in workDir.
- */
- public ProcessHandler(String[] cmdLines, PrintWriter log, File workDir)
- {
- this(null, log, workDir, null, 0);
- cmdLineArray = cmdLines;
- }
-
- /**
* Creates instance with specified external command and
* log stream where debug info and output
* of external command is printed out.
@@ -215,40 +163,6 @@ public class ProcessHandler
/**
* Creates instance with specified external command which
- * will be executed in the some work directory.
- * Debug info and output
- * of external commandis printed to stdout.
- */
- public ProcessHandler(String cmdLine, File workDir)
- {
- this(cmdLine, null, workDir, null, 0);
- }
-
- /**
- * Creates instance with specified external command which
- * will be executed in the some work directory.
- * Debug info and output printed in log stream.
- */
- public ProcessHandler(String cmdLine, PrintWriter log, File workDir)
- {
- this(cmdLine, log, workDir, null, 0);
- }
-
- /**
- * 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 .
- * The specified environment variables are set for the new process.
- * If log stream is null, logging is printed to stdout.
- */
- public ProcessHandler(String cmdLine, PrintWriter log, File workDir, String[] envVars)
- {
- this(cmdLine, log, workDir, envVars, 0);
- }
-
- /**
- * Creates instance with specified external command which
* will be executed in the some work directory and
*
* @param cmdLine the command to be executed
@@ -323,22 +237,6 @@ public class ProcessHandler
}
/**
- * If not equal 0, the time to maximal wait.
- */
- public void setProcessTimeout(int _n)
- {
- m_nProcessTimeout = _n;
- }
-
- /**
- * This command will call after ProcessTimeout is arrived.
- */
- public void setProcessKiller(String _s)
- {
- m_sProcessKiller = _s;
- }
-
- /**
* 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
@@ -394,16 +292,6 @@ public class ProcessHandler
}
}
- public boolean isTimedOut()
- {
- return mbTimedOut;
- }
-
- private void setTimedOut(boolean bTimedOut)
- {
- mbTimedOut = bTimedOut;
- }
-
/**
* Executes the command and returns only when the process
* exits.
@@ -476,26 +364,6 @@ public class ProcessHandler
isStarted = false;
}
- /**
- * Returns the time in seconds since 1st January 1970
- */
- private static long getSystemTime()
- {
- final long nTime = System.currentTimeMillis();
- return nTime;
- }
- private long m_nExactStartTimeInMillisec;
-
- private void initialExactStartTime()
- {
- m_nExactStartTimeInMillisec = getSystemTime();
- }
-
- public long getProcessStartTime()
- {
- return m_nExactStartTimeInMillisec;
- }
-
private void showEnvVars()
{
if (envVars != null)
@@ -530,7 +398,6 @@ public class ProcessHandler
}
showEnvVars();
log.println("");
- initialExactStartTime();
initializeProcessKiller();
m_aProcess = runtime.exec(cmdLineArray, envVars);
}
@@ -650,7 +517,6 @@ public class ProcessHandler
}
if (timeout < 0)
{
- setTimedOut(true);
log.println("The process has timed out!");
}
}