I think there's a bug in TypeResolver when it tries to resolve and cache the generic type of a read method for a mapped class (C) that inherits from an intermediate class (B) which itself inherits from a parent base class (A), eg:
abstract class A<ID extends Serializable>
ID getId()
setId(ID id)
abstract class B<ID extends Serializable> extends A<ID>
class C extends B<Long>
The generic type that will be cached by TypeResolver is ID of class B but the lookup will be made on ID of class A ! Since there are different TypeResolver will simple return null and the mapping will crash at runtime with a ClassCastException...
With only 1 level of inheritance (remove B in my example) it works !
I think the problem lies in the fact that the types are cached in a map keyed by their parameter. Like in my case I have ID multiple times but for Dozer they all should be equal, of course for Java their not!
Thanks
Christian
Vadim - could you please investigate how difficult is to fix this
Bug was found and fixed. Appropriate test added.
Seems to be fixed. Will be released in 5.3