summaryrefslogtreecommitdiff
path: root/javaunohelper
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-10-15 12:04:03 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-10-15 14:26:05 +0100
commitab22d11279db912f1b69a48b0fa676972b189aea (patch)
tree40f87ceb93aea8a45e22dd1eda5e9e1c21e6fcbc /javaunohelper
parentaa8f218079e2d311927d8aaf64b03b234453fb11 (diff)
coverity#1326731 Dm: Dubious method used
and coverity#1326732 Dm: Dubious method used coverity#1326734 Dm: Dubious method used coverity#1326735 Dm: Dubious method used coverity#1326739 Dm: Dubious method used Change-Id: Id9d39decf7442b503079ebcfe8c881f0f2fe3eb3
Diffstat (limited to 'javaunohelper')
-rw-r--r--javaunohelper/com/sun/star/comp/helper/Bootstrap.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/javaunohelper/com/sun/star/comp/helper/Bootstrap.java b/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
index 70328ce5ec8c..a36f16c9b25d 100644
--- a/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
+++ b/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
@@ -38,6 +38,7 @@ import java.io.File;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintStream;
+import java.io.UnsupportedEncodingException;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.Map;
@@ -333,9 +334,10 @@ public class Bootstrap {
new Thread( "Pipe: " + prefix) {
@Override
public void run() {
- BufferedReader r = new BufferedReader(
- new InputStreamReader( in ) );
try {
+ BufferedReader r = new BufferedReader(
+ new InputStreamReader(in, "UTF-8") );
+
for ( ; ; ) {
String s = r.readLine();
if ( s == null ) {
@@ -343,6 +345,8 @@ public class Bootstrap {
}
out.println( prefix + s );
}
+ } catch ( UnsupportedEncodingException e ) {
+ e.printStackTrace( System.err );
} catch ( java.io.IOException e ) {
e.printStackTrace( System.err );
}