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

Incorrect serialization specification of java.awt.Font

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.0
    • 1.3.0
    • docs
    • beta
    • sparc
    • solaris_2.6



      Name: ksC84122 Date: 03/22/2000


        
      The javadoc says:
       
       Class java.awt.Font implements Serializable

       Serialization Methods

      readObject

      private void readObject(ObjectInputStream s)
                       throws ClassNotFoundException,
                              IOException

            Read the ObjectInputStream and if it isnt null add a listener to receive item events fired by the Font.
      Unrecognised keys or values
            will be Ignored.
            See Also:
                  removeActionListener(), addActionListener()

      writeObject

      private void writeObject(ObjectOutputStream s)
                        throws ClassNotFoundException,
                               IOException

            Writes default serializable fields to stream. Writes a list of serializable ItemListener(s) as
            optional data. The non-serializable ItemListner(s) are detected and no attempt is made to serialize
            them.
            Serial Data:
                  Null terminated sequence of 0 or more pairs. The pair consists of a String and Object. The
                  String indicates the type of object and is one of the following : itemListenerK indicating and
                  ItemListener object.
      ------------------------------------------------------------

      However, java.awt.Font does not have any listeners, and implementation of readObject() and writeObject()
      in JDK does not depend on listener pairs as optional data.

      ======================================================================

            sharonz Sharon Zakhour (Inactive)
            skosunw Sko Sko (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: