jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionInputStream_Adapter.java | 10 +++++--- jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionOutputStream_Adapter.java | 12 +++++++--- 2 files changed, 15 insertions(+), 7 deletions(-)
New commits: commit d5cdc7567299f03e655dfbb1d59c371fb3253b88 Author: Noel Grandin <n...@peralex.com> Date: Mon Sep 29 11:30:07 2014 +0200 fix Java1.5 incompatibility the java.io.IOException(Throwable) constructor was only introduced in 1.6 Change-Id: Icd40e91cce7a2e89e4a70ad55f31baaa86eebfe2 diff --git a/jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionInputStream_Adapter.java b/jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionInputStream_Adapter.java index 48fea08..7f65c3b 100644 --- a/jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionInputStream_Adapter.java +++ b/jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionInputStream_Adapter.java @@ -46,7 +46,9 @@ class XConnectionInputStream_Adapter extends InputStream { try { len = _xConnection.read(_bytes, 1); } catch(com.sun.star.io.IOException ioException) { - throw new IOException(ioException); + IOException ex = new IOException(ioException.getMessage()); + ex.initCause(ioException); + throw ex; } if(DEBUG) System.err.println("#### " + getClass().getName() + " - one byte read:" + _bytes[0][0]); @@ -56,12 +58,12 @@ class XConnectionInputStream_Adapter extends InputStream { @Override public int read(byte[] b, int off, int len) throws IOException { -// byte bytes[][] = new byte[1][]; - try { len = _xConnection.read(_bytes, len - off); } catch(com.sun.star.io.IOException ioException) { - throw new IOException(ioException); + IOException ex = new IOException(ioException.getMessage()); + ex.initCause(ioException); + throw ex; } System.arraycopy(_bytes[0], 0, b, off, len); diff --git a/jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionOutputStream_Adapter.java b/jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionOutputStream_Adapter.java index 954afe8..fe97074 100644 --- a/jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionOutputStream_Adapter.java +++ b/jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionOutputStream_Adapter.java @@ -44,7 +44,9 @@ class XConnectionOutputStream_Adapter extends OutputStream { try { _xConnection.write(_bytes); } catch(com.sun.star.io.IOException ioException) { - throw new IOException(ioException); + IOException ex = new IOException(ioException.getMessage()); + ex.initCause(ioException); + throw ex; } if(DEBUG) System.err.println("#### " + this.getClass() + " - one byte written:" + _bytes[0]); @@ -65,7 +67,9 @@ class XConnectionOutputStream_Adapter extends OutputStream { try { _xConnection.write(bytes); } catch(com.sun.star.io.IOException ioException) { - throw new IOException(ioException); + IOException ex = new IOException(ioException.getMessage()); + ex.initCause(ioException); + throw ex; } } @@ -74,7 +78,9 @@ class XConnectionOutputStream_Adapter extends OutputStream { try { _xConnection.flush(); } catch(com.sun.star.io.IOException ioException) { - throw new IOException(ioException); + IOException ex = new IOException(ioException.getMessage()); + ex.initCause(ioException); + throw ex; } } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits