remondis-it / remap

A declarative mapping library to simplify testable object mappings.
Apache License 2.0
122 stars 22 forks source link

Trying to reproduce the bug mentioned in #144 #145

Open schuettec opened 2 years ago

schuettec commented 2 years ago

Trying to reproduce the bug mentioned in #144

Findings: Currently the mapper analyzes the type of properties. If the source value of a property is an instance of a Map, the map conversion is triggered. The map conversion creates a map instance using Collectors.toMap function. The map instance might not be assignment compatible with the target value of the bean.

This is some kind of hidden convention: The problem does not occur as long as the bean properties use super types like Map, List, Set etc.