orika-mapper/orika — pull request #5 by papegaaij (2013-03-20 06:51:41+00:00)
Title: Strategies are cached under proxy classes

In some places, sourceObject.getClass() is used as the primary key to store cached strategies. With proxy classes and polymorphic types, this can cause the wrong strategy to be used, resulting in all sorts of errors, such as a ClassCastException in the generated mappers. The added testcase shows this problem.

For this, I've made the following changes:
* You can now lookup the UnenhanceStrategy from MapperFactory
* In DefaultBoundMapperFacade unenhance the source type, and use both the actual type and unenhanced type as key.
* In MapperFacadeImpl use the nomalizedSourceType in the key, not the initial source type.