From ab22d11279db912f1b69a48b0fa676972b189aea Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 15 Oct 2015 12:04:03 +0100 Subject: 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 --- bean/com/sun/star/comp/beans/LocalOfficeConnection.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'bean/com') diff --git a/bean/com/sun/star/comp/beans/LocalOfficeConnection.java b/bean/com/sun/star/comp/beans/LocalOfficeConnection.java index 70d51dfd497e..d58a30fe23f6 100644 --- a/bean/com/sun/star/comp/beans/LocalOfficeConnection.java +++ b/bean/com/sun/star/comp/beans/LocalOfficeConnection.java @@ -755,9 +755,10 @@ public class LocalOfficeConnection @Override public void run() { - java.io.BufferedReader r = new java.io.BufferedReader( - new java.io.InputStreamReader(m_in) ); try { + java.io.BufferedReader r = new java.io.BufferedReader( + new java.io.InputStreamReader(m_in, "UTF-8") ); + for ( ; ; ) { String s = r.readLine(); if ( s == null ) { @@ -765,6 +766,8 @@ public class LocalOfficeConnection } m_print.println(s); } + } catch ( UnsupportedEncodingException e ) { + e.printStackTrace( System.err ); } catch ( java.io.IOException e ) { e.printStackTrace( System.err ); } -- cgit