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

RFE: Point2D.Double and Point2D.Float should be Serializable

XMLWordPrintable

    • 2d
    • b63
    • generic, x86, sparc
    • generic, linux, solaris_2.5.1, windows_95, windows_nt, windows_2000, windows_xp

      Name: rlT66838 Date: 08/17/99


      Point2D.Double and Point2D.Float should be Serializable.
      (Review ID: 94014)
      ======================================================================

      Name: skT88420 Date: 11/11/99


      java version "1.2.2"
      Classic VM (build JDK-1.2.2-W, native threads, symcjit)

      class java.awt.geom.Point2D.Double isn't serializable
      same happens with java.awt.Point and java.awt.Point2D.Float

      and other Java2D and AWT structures aren't serializable!
      (Review ID: 97755)
      ======================================================================

      Name: krT82822 Date: 11/20/99


      Java 1.2.2 under windowNT(service pack4)

      java.awt.geom.Point2D.Double is not serialisable

      java.io.NotSerializableException: java.awt.geom.Point2D$Double
      (Review ID: 98097)
      ======================================================================

      Name: rmT116609 Date: 02/10/2002


      DESCRIPTION OF THE PROBLEM :

      java.awt.geom.Point2D doesn't implement Serializable. I'm doing distributed computing and need to pass around 2D information. Because this simple class isn't seralizable I must create my own 2d point class and translate between them on the wire. Considering the triviality of making Point2D serializable, it seems like a lot of bang for the buck to add the marker interface.

      The fact that it is Cloneable is just stronger evidence of the triviality of this fix.

      This is true of many classes in the java.awt.geom -- I haven't done a full survey, but the other geometric classes I found all have the same flaw: Cloneable but not Serializable.
      (Review ID: 139491)
      ======================================================================

            flar Jim Graham
            rlewis Roger Lewis (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: