#235 NPE is thrown

Dozer v5.2
closed-fixed
5
2010-01-02
2009-12-07
No

NPE is thrown when bi-direction mapping type is used but class of the source object has no setters. Despite the fact that there are no setters the object can be used as data source for the destination object. In my opinion an exception should be thrown during setting values on such an object.

java.lang.NullPointerException
at org.dozer.propertydescriptor.GetterSetterPropertyDescriptor.determinePropertyType(GetterSetterPropertyDescriptor.java:270)
at org.dozer.propertydescriptor.GetterSetterPropertyDescriptor.getPropertyType(GetterSetterPropertyDescriptor.java:56)
at org.dozer.fieldmap.FieldMap.getSrcFieldType(FieldMap.java:118)
at org.dozer.loader.MappingsParser.processMappings(MappingsParser.java:104)
at org.dozer.loader.CustomMappingsLoader.load(CustomMappingsLoader.java:91)
at org.dozer.DozerBeanMapper.loadCustomMappings(DozerBeanMapper.java:151)
at org.dozer.DozerBeanMapper.getMappingProcessor(DozerBeanMapper.java:134)
at org.dozer.DozerBeanMapper.map(DozerBeanMapper.java:90)

Discussion

  • dmitry (lv)

    dmitry (lv) - 2010-01-02

    Fixed in trunk. Thanks for reporting. ... and a happy new year :)

    --
    Dmitry

     
  • dmitry (lv)

    dmitry (lv) - 2010-01-02
    • milestone: 898417 --> Dozer v5.2
    • 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