XStream
  1. XStream
  2. XSTR-575

adding new field with same name: incorrect deserialization

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.3.1
    • Fix Version/s: None
    • Component/s: Converters
    • Labels:
      None

      Description

      According to the XStream site, in the FAQ for "How does XStream deal with newer versions of classes?", it says "If a new field is added to the class, deserializing an old version will leave the field uninitialized."

      However, if the new field has the same name as a superclass' private field, then upon deserialization, the new field is initialized with the parent's field's original value, and the parent's field is left uninitialized.

      Attached is a unit test demonstrating the bug.

        People

        • Assignee:
          Jörg Schaible
          Reporter:
          Sushant Prakash
        • Votes:
          0 Vote for this issue
          Watchers:
          0 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: