summaryrefslogtreecommitdiffstats
path: root/libjava/java/io/ObjectOutputStream.java
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2003-08-01 03:34:52 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2003-08-01 03:34:52 +0000
commitdbf494451896169ea975d9599e9a408c3651e4c7 (patch)
tree2c95f8943b3e378b8ac84603e28841387ef9467d /libjava/java/io/ObjectOutputStream.java
parent910e3c85c88c68118afffefae5222bd9cb74c3c3 (diff)
downloadppe42-gcc-dbf494451896169ea975d9599e9a408c3651e4c7.tar.gz
ppe42-gcc-dbf494451896169ea975d9599e9a408c3651e4c7.zip
More for PR libgcj/11737:
* java/io/ObjectInputStream.java (processResolution): Use getMethod. (getMethod): Make method accessible. (getField): Make field accessible. (setBooleanField): Don't call setAccessible here. (setByteField, setCharField, setDoubleField, setFloatField, setIntField, setLongField, setShortField, setObjectField): Likewise. (callReadMethod): Don't check whether method is null. Catch NoSuchMethodException. * java/io/ObjectOutputStream.java (callWriteMethod): Initialize cause on thrown exceptions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70038 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/io/ObjectOutputStream.java')
-rw-r--r--libjava/java/io/ObjectOutputStream.java17
1 files changed, 12 insertions, 5 deletions
diff --git a/libjava/java/io/ObjectOutputStream.java b/libjava/java/io/ObjectOutputStream.java
index 49cb636ee0d..1437a4f6918 100644
--- a/libjava/java/io/ObjectOutputStream.java
+++ b/libjava/java/io/ObjectOutputStream.java
@@ -1197,7 +1197,8 @@ public class ObjectOutputStream extends OutputStream
}
- private void callWriteMethod (Object obj, ObjectStreamClass osc) throws IOException
+ private void callWriteMethod (Object obj, ObjectStreamClass osc)
+ throws IOException
{
Class klass = osc.forClass();
try
@@ -1220,13 +1221,19 @@ public class ObjectOutputStream extends OutputStream
if (exception instanceof IOException)
throw (IOException) exception;
- throw new IOException ("Exception thrown from writeObject() on " +
- klass + ": " + exception.getClass().getName());
+ IOException ioe
+ = new IOException ("Exception thrown from writeObject() on " +
+ klass + ": " + exception.getClass().getName());
+ ioe.initCause(exception);
+ throw ioe;
}
catch (Exception x)
{
- throw new IOException ("Failure invoking writeObject() on " +
- klass + ": " + x.getClass().getName());
+ IOException ioe
+ = new IOException ("Failure invoking writeObject() on " +
+ klass + ": " + x.getClass().getName());
+ ioe.initCause(x);
+ throw ioe;
}
}
OpenPOWER on IntegriCloud