-
Bug
-
Resolution: Fixed
-
P3
-
6
-
b53
-
generic
-
generic
After the fix about removing all the finalizers from AWT code, all the AWT components have become unserializable. Execute the following simple test:
----
import java.awt.*;
import java.io.*;
public class SerializeBroken
{
public static void main(String[] args)
{
Frame f = new Frame();
f.setBounds(100, 100, 100, 100);
f.setVisible(true);
try
{
ObjectOutputStream out = new ObjectOutputStream(new ByteArrayOutputStream());
out.writeObject(f);
}
catch (Exception z)
{
z.printStackTrace(System.err);
}
}
}
----
If the frame is successfully serialized, the bug is not reproduced.
----
import java.awt.*;
import java.io.*;
public class SerializeBroken
{
public static void main(String[] args)
{
Frame f = new Frame();
f.setBounds(100, 100, 100, 100);
f.setVisible(true);
try
{
ObjectOutputStream out = new ObjectOutputStream(new ByteArrayOutputStream());
out.writeObject(f);
}
catch (Exception z)
{
z.printStackTrace(System.err);
}
}
}
----
If the frame is successfully serialized, the bug is not reproduced.