Whenever a List type is used as the destination of an indexed property, Dozer instantiates a new ArrayList as the implementation type to be used. Now, some (legacy or badly programmed) systems do not declare instance variables with the basic interface types, but use implementation types such as 'java.util.Vector', which causes mapping failures.
We've fixed the bug by
1) determining if the declared type is an interface type, if so, instantiate an ArrayList (for List) or HashSet (for Set)
2) if the declared type is an implementation type, use reflection to create a new Collection instance
Log in to post a comment.