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
This commit is contained in:
parent
c3a29423de
commit
cd3352b625
5 changed files with 46 additions and 34 deletions
21
libjava/testsuite/libjava.lang/pr21785.java
Normal file
21
libjava/testsuite/libjava.lang/pr21785.java
Normal file
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue