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

serialPersistentFields ignored if set to null

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 6
    • 1.3.0
    • core-libs
    • None

      If serialPersistentFields is defined with a value of null, serialization
      behaves as if serialPersistentFields was not defined at all. This particular
      case is not clearly addressed in the spec, but it seems intuitive that setting
      serialPersistentFields to null should have the same effect as setting it to
      an empty array of ObjectStreamFields (e.g., ObjectStreamClass.NO_FIELDS).

      Code demonstrating the bug is attached.

            aozerov Andrey Ozerov
            mwarressunw Michael Warres (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: