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

Adding a new field breaks serialization compatibility

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 1.3.1
    • other-libs
    • None
    • sparc
    • solaris_7

      As per the serialization spec on http://java.sun.com/j2se/1.3/docs/guide/serialization/spec/version.doc8.html, adding a new field to a class is a compatible change for serialization. This means that if a class is evolved by adding a new field, then the new class and the original class can be serialized and deserialized amongst them with out any version mismatch. However it does not seem to happen so.

      I've demonstrated the problem to Everett. A detailed report for serialization test execution against rip-int could be found at javaweb.eng/~arung/corba/merlin/serialization/evolution/ser.result.txt.

      Thanks,
      Arun

            eandersosunw Everett Anderson (Inactive)
            arungup Arun Gupta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: