XStream
  1. XStream
  2. XSTR-288

Lost id attributes with nested implicit collections

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.2
    • Component/s: None
    • Labels:
      None
    • JDK version and platform:
      java version "1.4.2_08" on Windows XP Professional Version 2002 Service Pack 2

      Description

      ID attributes get lost outside an element. See the following testcase.

      import com.thoughtworks.xstream.XStream; import com.thoughtworks.xstream.io.xml.DomDriver;
      import java.util.ArrayList;

      public class Bug {
      public static void main(String[] args)

      { final List another = new List(); another.o = new Object(); another.list.add(new Object()); final XStream x = new XStream(new DomDriver()); x.setMode(XStream.ID_REFERENCES); x.addImplicitCollection(List.class, "list"); System.out.println(x.toXML(another)); }

      }

      class List {
      public Object o;
      public ArrayList list = new ArrayList();
      }

        People

        • Assignee:
          Unassigned
          Reporter:
          Daniel Frey
        • Votes:
          0 Vote for this issue
          Watchers:
          0 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: