CAY-597?

From: Robert Zeigler (robert..uregumption.com)
Date: Wed Jan 17 2007 - 11:04:52 EST

  • Next message: Joe Schaefer: "list moved"

    What's the status of CAY-597? Kevin mentioned something about
    intentional behavior in the comments, but there's definitely a bug there
    (see my comments from last night). The gist is that, when using a
    mapping file, collections fail to properly close the last element in a
    list of objects, so you get behavior like:
    <!-- root object has children listitem... three of them for the
    demonstration purpose. root object also has child singletonitem -->
    <root>
      <listitem>
         ...
      </listitem>
      <listitem>
        ...
       </listitem>
       <listitem>
        <singletonitem>
           ...
         </singletonitem>
      </listitem>
    </root>

    Note how all "listitem" elements are correct closed/nested, except the last.
    Comments? A possible fix would be to make XMLEncoder.pop protected,
    instead of private, and then have SerializableEntity call pop in
    encodeAsXML:
     
                if (!c.isEmpty()) {

                    // push the first node, and create the rest as peers.
                    Iterator it = c.iterator();
                    encodeObject(encoder, it.next(), true);
                    while (it.hasNext()) {
                        encodeObject(encoder, it.next(), false);
                    }
                    encoder.pop()<--- something like that...
                }

    Robert



    This archive was generated by hypermail 2.0.0 : Wed Jan 17 2007 - 11:05:49 EST