diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-01-21 17:37:42 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-01-21 20:36:57 +0000 |
commit | 711f203d1eeaeb0c2c75569c8606e98c394fd301 (patch) | |
tree | a6cd901b728cf034721915e7c1a67aedfa2dbefd | |
parent | 63f3d68d7fcfa1c677855c4c0eadc638999411de (diff) |
coverity#1399444 UwF: Unwritten field
and
coverity#1399441 NP: Null pointer dereference
since
commit 10cb59eb914ba722c203242272de244d795a51e8
Date: Mon Jan 16 16:41:53 2017 +0200
remove some unused Java code
Change-Id: Ieab0325c8685cdc89458570ac8e4d3292af84dff
Reviewed-on: https://gerrit.libreoffice.org/33377
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | qadevOOo/runner/helper/ProcessHandler.java | 42 |
1 files changed, 9 insertions, 33 deletions
diff --git a/qadevOOo/runner/helper/ProcessHandler.java b/qadevOOo/runner/helper/ProcessHandler.java index 7ec20a570420..1e136d97095e 100644 --- a/qadevOOo/runner/helper/ProcessHandler.java +++ b/qadevOOo/runner/helper/ProcessHandler.java @@ -109,9 +109,7 @@ class Pump extends Thread */ public class ProcessHandler { - private String cmdLine; - private String[] cmdLineArray; private String[] envVars = null; private File workDir = null; private PrintWriter log; @@ -254,47 +252,25 @@ public class ProcessHandler final Runtime runtime = Runtime.getRuntime(); try { - if (cmdLine == null) + if (workDir != null) { - log.println(utils.getDateTime() + "execute: Starting command from array: "); - for (int i = 0; i < cmdLineArray.length; i++) - { - log.println(cmdLineArray[i]); - } + log.println(utils.getDateTime() + "execute: Starting command: "); + log.println(cmdLine + " path=" + workDir.getAbsolutePath()); showEnvVars(); - log.println(""); - initializeProcessKiller(); - m_aProcess = runtime.exec(cmdLineArray, envVars); + m_aProcess = runtime.exec(cmdLine, envVars, workDir); } else { - if (workDir != null) - { - log.println(utils.getDateTime() + "execute: Starting command: "); - log.println(cmdLine + " path=" + workDir.getAbsolutePath()); - showEnvVars(); - m_aProcess = runtime.exec(cmdLine, envVars, workDir); - } - else - { - log.println(utils.getDateTime() + "execute: Starting command: "); - log.println(cmdLine); - showEnvVars(); - m_aProcess = runtime.exec(cmdLine, envVars); - } + log.println(utils.getDateTime() + "execute: Starting command: "); + log.println(cmdLine); + showEnvVars(); + m_aProcess = runtime.exec(cmdLine, envVars); } isStarted = true; } catch (java.io.IOException e) { - if (cmdLine == null) - { - log.println(utils.getDateTime() + "execute: The command array can't be started: " + e); - } - else - { - log.println(utils.getDateTime() + "execute: The command " + cmdLine + " can't be started: " + e); - } + log.println(utils.getDateTime() + "execute: The command " + cmdLine + " can't be started: " + e); return; } dbg("execute: pump io-streams"); |