#184 Map<?, List<?>> is mapped incorrectly

Dozer v5.1

Imagine a class having a property with Map<?, List<?>> type.
The values of the map (lists) are not mapped properly.
I attach a simple program showing the problem.

Tried with both 4.2 and 5.0 - the result is the same (of course needing to change the imports to run against 4.2).


  • GrzegorzOledzki

    GrzegorzOledzki - 2009-04-01
  • Mariusz Pala

    Mariusz Pala - 2009-06-04

    I have also problem with mapping such a map. Map keys are OK, but all values are null.

  • Mariusz Pala

    Mariusz Pala - 2009-06-04

    add these lines at the end of method MappingProcessor.mapCollection(Object srcObj, Object srcCollectionValue, FieldMap fieldMap, Object destObj);

    // List to Map value
    else if (CollectionUtils.isCollection(srcFieldType) && MappingUtils.isSupportedMap(destCollectionType)) {
    result = mapListToList(srcObj, (List<?>) srcCollectionValue, fieldMap, destObj);

    Unfortunately it works only for primitive types...

  • Mariusz Pala

    Mariusz Pala - 2009-06-04

    OK, my patch works, just for custom type, the hint is needed.

  • dmitry (lv)

    dmitry (lv) - 2009-06-08

    Fixed. Tests are incorporated into the test suite.

  • dmitry (lv)

    dmitry (lv) - 2009-06-08
    • milestone: 888640 --> Dozer v5.1
    • assigned_to: nobody --> buzdin
    • status: open --> closed-fixed

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks