#213 Null value in SET cause NPE

Dozer v5.2

the bug is the same that describe in the tracker item [Null Value in String Array causes NPE - ID: 1373824]

but for a Set<Object> there's a NullPointerException too.
11:45:25.140 [ERROR] org.dozer.MappingProcessor - Field mapping error -->
MapId: null
Type: null
Source parent class: bo.facade.returnAuthorization.FReturnAuthorization
Source field name: equipmentReturnCauses
Source field type: class java.util.HashSet
Source field value: [null, bo.facade.equipment.returnCause.FEquipmentReturnCause@61373f]
Dest parent class: bo.returnAuthorization.ReturnAuthorization
Dest field name: equipmentReturnCauses
Dest field type: java.util.Set
at org.dozer.MappingProcessor.addToSet(MappingProcessor.java:651)
at org.dozer.MappingProcessor.mapCollection(MappingProcessor.java:509)
at org.dozer.MappingProcessor.mapOrRecurseObject(MappingProcessor.java:394)
at org.dozer.MappingProcessor.mapFromFieldMap(MappingProcessor.java:300)
at org.dozer.MappingProcessor.mapField(MappingProcessor.java:246)
at org.dozer.MappingProcessor.map(MappingProcessor.java:215)
at org.dozer.MappingProcessor.map(MappingProcessor.java:160)
at org.dozer.MappingProcessor.map(MappingProcessor.java:118)
at org.dozer.MappingProcessor.map(MappingProcessor.java:113)
at org.dozer.DozerBeanMapper.map(DozerBeanMapper.java:94)

This bug was fixed for a List in the function
org.dozer.MappingProcessor.addOrUpdateToList(FieldMap fieldMap,
Collection sourceCollectionValue, ClassMap classMap,
Object destObj, Class destEntryType)

but for a Set, it has to be fixed in the function
org.dozer.MappingProcessor.addToSet(Object, FieldMap, Collection<?>, Object)
with the same logic




  • dmitry (lv)

    dmitry (lv) - 2009-10-23
    • assigned_to: nobody --> vadeg
  • Vadim Shaigorodskiy

    Bug fixed in trunk

  • Vadim Shaigorodskiy

    • milestone: 888640 --> Dozer v5.2
    • status: open --> open-fixed
  • dmitry (lv)

    dmitry (lv) - 2009-12-20

    will be shipped as part of 5.2

  • dmitry (lv)

    dmitry (lv) - 2009-12-20
    • status: open-fixed --> 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