XStream
  1. XStream
  2. XSTR-180

ObjectInputStream.defaultReadObject() fails when class has no default fields

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.1.1
    • Component/s: None
    • Labels:
      None

      Description

      Due to an optimization in XStream to produce tighter XML, the <default/> element written from ObjectOutputStream.defaultWriteObject() (from an object's custom writeObject() method) is skipped if there are no fields to write inside it.

      However this causes a failure when the ObjectInputStream.defaultReadObject() is called as it expects to find some content.

        People

        • Assignee:
          Unassigned
          Reporter:
          Joe Walnes
        • Votes:
          0 Vote for this issue
          Watchers:
          0 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: