gcc/libjava/testsuite/libjava.lang/pr21785.java
Tom Tromey cd3352b625 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
2005-06-01 19:58:25 +00:00

22 lines
546 B
Java

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);
}
}
}