XStream
  1. XStream
  2. XSTR-706

@XStreamImplicit collections not deserializing properly when using references

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Not A Bug
    • Affects Version/s: 1.4.2
    • Fix Version/s: None
    • Component/s: Annotations
    • Labels:
      None
    • JDK version and platform:
      1.6.0_33 for Mac OS 10.7

      Description

      When using implicit collections, when one collection references items in another collection, XStream is unable to properly reproduce the object graph, and one of the collections ends up being null.

      Attached is a sample project with a JUnit test which reproduces the issue. It spits the XML to System.out before trying to deserialize, so you can see what it's generating. The resulting XML looks like this:

      <bunny-family>
        <bunny name="mother">
          <bunny-child name="15b2b5a2-2d52-4216-b714-102dd327611b"/>
          <bunny-child name="e3674e4a-8c0b-41bc-ad99-8153595c6d0b"/>
        </bunny>
        <bunny name="father">
          <bunny-child reference="../../bunny/bunny-child"/>
          <bunny-child reference="../../bunny/bunny-child[2]"/>
        </bunny>
      </bunny-family>
      

        People

        • Assignee:
          Jörg Schaible
          Reporter:
          Steven Swor
        • Votes:
          0 Vote for this issue
          Watchers:
          2 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: