diff options
author | Noel Grandin <noel@peralex.com> | 2014-09-29 11:30:07 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-09-29 11:31:01 +0200 |
commit | d5cdc7567299f03e655dfbb1d59c371fb3253b88 (patch) | |
tree | 3fc55e49f7335b5f4d63d353e70291aee7f9bd7f /jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionOutputStream_Adapter.java | |
parent | 89ea05d8547b12de1041e9b637690731daa42a62 (diff) |
fix Java1.5 incompatibility
the java.io.IOException(Throwable) constructor was only introduced
in 1.6
Change-Id: Icd40e91cce7a2e89e4a70ad55f31baaa86eebfe2
Diffstat (limited to 'jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionOutputStream_Adapter.java')
-rw-r--r-- | jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionOutputStream_Adapter.java | 12 |
1 files changed, 9 insertions, 3 deletions
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 954afe8df6a0..fe9707492335 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; } } } |