diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-10-04 13:04:25 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-10-05 09:50:53 +0200 |
commit | a25868231adba6a3be30f9aedb71315de0c79acd (patch) | |
tree | acfb43592fe19d84102d5d389a15b4b0d53760db /qadevOOo/runner/helper | |
parent | e1261e6ea6e897d38f69c0d250ec34ccf0f6d545 (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')
-rw-r--r-- | qadevOOo/runner/helper/AppProvider.java | 4 | ||||
-rw-r--r-- | qadevOOo/runner/helper/OfficeProvider.java | 3 | ||||
-rw-r--r-- | qadevOOo/runner/helper/ProcessHandler.java | 8 |
3 files changed, 10 insertions, 5 deletions
diff --git a/qadevOOo/runner/helper/AppProvider.java b/qadevOOo/runner/helper/AppProvider.java index e8f77d1f059a..a42411ac6589 100644 --- a/qadevOOo/runner/helper/AppProvider.java +++ b/qadevOOo/runner/helper/AppProvider.java @@ -18,6 +18,8 @@ package helper; +import java.io.UnsupportedEncodingException; + /** * * Interface to get a Manager to access the application to check @@ -27,7 +29,7 @@ public interface AppProvider { /** * Method to get the desired Manager */ - Object getManager(lib.TestParameters param); + Object getManager(lib.TestParameters param) throws UnsupportedEncodingException; /** * Method to dispose the desired Manager diff --git a/qadevOOo/runner/helper/OfficeProvider.java b/qadevOOo/runner/helper/OfficeProvider.java index 880565896443..01599cd3ff15 100644 --- a/qadevOOo/runner/helper/OfficeProvider.java +++ b/qadevOOo/runner/helper/OfficeProvider.java @@ -31,6 +31,7 @@ import com.sun.star.util.XStringSubstitution; import java.io.File; import java.io.PrintWriter; +import java.io.UnsupportedEncodingException; import lib.TestParameters; @@ -146,7 +147,7 @@ public class OfficeProvider implements AppProvider /** * Method to get the ServiceManager of an Office */ - public Object getManager(lib.TestParameters param) + public Object getManager(lib.TestParameters param) throws UnsupportedEncodingException { String errorMessage = null; boolean bAppExecutionHasWarning = false; 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 { |