Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6190713

Reg: Subclasses of swing components are not serializable

XMLWordPrintable

    • b14
    • generic, x86
    • generic, linux, windows_xp

        A subclass of JTextArea or JTextField is not serializable. It is throwing the following exception:

        java.io.NotSerializableException: javax.swing.plaf.basic.BasicTextUI$UpdateHandler
                at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
                at java.io.ObjectOutputStream.access$100(ObjectOutputStream.java:135)
                at java.io.ObjectOutputStream$PutFieldImpl.writeFields(ObjectOutputStream.java:1512)
                at java.io.ObjectOutputStream.writeFields(ObjectOutputStream.java:418)
                at java.awt.Container.writeObject(Container.java:3461)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:585)
                at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:890)
                at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1333)
                at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
                at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
                at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
                at SerializeTest.doTest(SerializeTest.java:16)
                at SerializeTest.main(SerializeTest.java:8)

        This is a regression in tiger. Reproducible with tiger fcs and mustang builds. It works fine with 1.4.2.

        To reproduce:

        Run the attached testcase.
        ###@###.### 11/4/04 13:52 GMT

              svioletsunw Scott Violet (Inactive)
              gramachasunw Girish Ramachandran (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: