summaryrefslogtreecommitdiff
path: root/qadevOOo/runner/helper/ProcessHandler.java
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-10-04 13:04:25 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-10-05 09:50:53 +0200
commita25868231adba6a3be30f9aedb71315de0c79acd (patch)
treeacfb43592fe19d84102d5d389a15b4b0d53760db /qadevOOo/runner/helper/ProcessHandler.java
parente1261e6ea6e897d38f69c0d250ec34ccf0f6d545 (diff)
coverity#1399440 Dm: Dubious method used
Change-Id: Ied0a5218b4f95a300d09483315d577b5bdf01bae Reviewed-on: https://gerrit.libreoffice.org/43135 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'qadevOOo/runner/helper/ProcessHandler.java')
-rw-r--r--qadevOOo/runner/helper/ProcessHandler.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/qadevOOo/runner/helper/ProcessHandler.java b/qadevOOo/runner/helper/ProcessHandler.java
index 2b2e94efed38..7098db7d2590 100644
--- a/qadevOOo/runner/helper/ProcessHandler.java
+++ b/qadevOOo/runner/helper/ProcessHandler.java
@@ -19,6 +19,8 @@ package helper;
import java.io.InputStream;
import java.io.File;
+import java.io.OutputStreamWriter;
+import java.io.UnsupportedEncodingException;
import java.io.PrintWriter;
import java.io.PrintStream;
import java.io.LineNumberReader;
@@ -128,7 +130,7 @@ public class ProcessHandler
* log stream where debug info and output
* of external command is printed out.
*/
- public ProcessHandler(String cmdLine, PrintWriter log)
+ public ProcessHandler(String cmdLine, PrintWriter log) throws UnsupportedEncodingException
{
this(cmdLine, log, null, null);
}
@@ -157,7 +159,7 @@ public class ProcessHandler
* Waits for the process to end regulary
*
*/
- private ProcessHandler(String cmdLine, PrintWriter log, File workDir, String[] envVars)
+ private ProcessHandler(String cmdLine, PrintWriter log, File workDir, String[] envVars) throws UnsupportedEncodingException
{
this.cmdLine = cmdLine;
this.workDir = workDir;
@@ -165,7 +167,7 @@ public class ProcessHandler
this.envVars = envVars;
if (log == null)
{
- this.log = new PrintWriter(System.out);
+ this.log = new PrintWriter(new OutputStreamWriter(System.out, "UTF-8"));
}
else
{