Friday 6 September 2013

XStream unmarshalled collection contains wrong number of items

Assume we have the class:

public class A {
    Collection<B> bCollection;
}

When we unmarshall xml into A it may occur that bCollection contains wrong number of items.
Then make sure that B implements right equals() and hashCode().

No comments:

Post a Comment