-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
1.2.0
-
sparc
-
solaris_2.5
Name: avC70361 Date: 05/31/98
The exception java.io.NotSerializableException: java.lang.ref.SoftReference
is thrown when trying to serialize a Frame instance.
Here is teh test demonstrating the bug.
-----------------FrameTest.java-------------
import java.awt.*;
import java.io.*;
public class FrameTest {
public static void main(String args[]) {
Frame frame = new Frame("frame");
ObjectOutputStream stream = null;
try {
stream = new ObjectOutputStream(new ByteArrayOutputStream());
stream.writeObject(frame);
stream.close();
} catch(IOException e) {
System.out.println("Couldn't write " + frame + " : " + e);
}
System.exit(0);
}
}
-------------Test output----------
<avv@stardust(pts/7).465> java -fullversion
java full version "JDK-1.2beta4-G"
<avv@stardust(pts/7).466> java FrameTest
Couldn't write java.awt.Frame[frame0,0,0,0x0,invalid,hidden,layout=java.awt.BorderLayout,resizable,title=frame] : java.io.NotSerializableException: java.lang.ref.SoftReference
======================================================================
- duplicates
-
JDK-4146452 Regression: Frames no longer serializable
-
- Closed
-