In latest release (5.2), DozerConverter cannot perform a mapping involving a primitive value.
Bug 2919389 - resulted in a change that allows primitive to Object mapping to work, but primitive to primitive mapping still fails.
This is because int.class is not treated the same as Integer.class in org.dozer.DozerConverter.convert(Object, Object, Class<?>, Class<?>)
I'm attaching a patch to the test case demonstrating the problem. and a possible solution (if both destination and source classes are primitive, replace one of them with it's associated wrapper class before decided whether this is a covertFrom() or a convertTo())
Log in to post a comment.