aboutsummaryrefslogtreecommitdiff
path: root/libjava/testsuite/libjava.lang/pr21785.java
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2005-06-01 19:58:25 +0000
committerTom Tromey <tromey@gcc.gnu.org>2005-06-01 19:58:25 +0000
commitcd3352b625b40e18a95bb5db35de31b8951e4d82 (patch)
tree12419b4dbd84dc19200216a422ba5bca825d6f32 /libjava/testsuite/libjava.lang/pr21785.java
parentc3a29423de8cfb7e2b5642b9d44eb21e4b286aec (diff)
downloadgcc-cd3352b625b40e18a95bb5db35de31b8951e4d82.zip
gcc-cd3352b625b40e18a95bb5db35de31b8951e4d82.tar.gz
gcc-cd3352b625b40e18a95bb5db35de31b8951e4d82.tar.bz2
re PR libgcj/21785 (ClassNotFound during deserialization)
PR libgcj/21785: * java/io/natObjectInputStream.cc (currentClassLoader): Removed. (currentLoader): New method. * java/io/ObjectInputStream.java (resolveProxyClass): Use currentLoader. (currentLoader): Now native. (currentClassLoader): Removed. * testsuite/libjava.lang/pr21785.java: New file. * testsuite/libjava.lang/pr21785.out: New file. From-SVN: r100462
Diffstat (limited to 'libjava/testsuite/libjava.lang/pr21785.java')
-rw-r--r--libjava/testsuite/libjava.lang/pr21785.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/libjava/testsuite/libjava.lang/pr21785.java b/libjava/testsuite/libjava.lang/pr21785.java
new file mode 100644
index 0000000..7869754
--- /dev/null
+++ b/libjava/testsuite/libjava.lang/pr21785.java
@@ -0,0 +1,21 @@
+import java.io.*;
+
+public class pr21785 implements Serializable
+{
+ public static void main(String[] args)
+ {
+ try {
+ ByteArrayOutputStream outb = new ByteArrayOutputStream();
+ ObjectOutputStream outs = new ObjectOutputStream(outb);
+ outs.writeObject(new pr21785());
+ byte[] store = outb.toByteArray();
+
+ ByteArrayInputStream inb = new ByteArrayInputStream(store);
+ ObjectInputStream ins = new ObjectInputStream(inb);
+ ins.readObject();
+ }
+ catch (Throwable e) {
+ throw new Error(e);
+ }
+ }
+}