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

-Xlint serial flag could perform correctness checks on readObject/writeObject

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 7
    • tools
    • generic
    • generic

      The serialization specification defines several correctness properties of readObject and and writeObject methods. For example, for writeObject "Either ObjectOutputStream's defaultWriteObject or writeFields method must be called once (and only once)..." [1]

      The -Xlint:serial checking of javac could be expanded to analyze the bodies of serialization methods for these properties.

      [1] http://download.oracle.com/javase/6/docs/platform/serialization/spec/output.html#861

            Unassigned Unassigned
            darcy Joe Darcy
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: