summaryrefslogtreecommitdiff
path: root/libjava/testsuite/libjava.lang/pr21785.java
blob: 7869754977aa4ee30d134f0ba1a677a08a288c37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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);
    }
  }
}