cd3352b625
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
22 lines
546 B
Java
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);
|
|
}
|
|
}
|
|
}
|