Hi Robert,
I can't comment on the substance, but AFAIK Kevin is on vacation
right now, so he probably won't be able to reply for the next week
(or more?).
Andrus
On Jan 17, 2007, at 7:04 PM, Robert Zeigler wrote:
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