MapStruct v1.2.0.Beta3 Release Notes

Release Date: 2017-05-31 // almost 7 years ago
  • โœจ Enhancements

    • โž• Add a switch to turn off auto-mappings (#993)
    • Validate value given for date format is valid (#725 and #445)
    • ๐ŸŽ Set initial capacity for new collection / map element in collection / map mappings (#777). This one also increases the performance of the generated code
    • โž• Add SPI for excluding types/elements from automatic sub-mapping generation (#1154)
    • Suggest property name in error message when referring to a non-existent property in @mapping (#122)
    • General code cleanups (#1213)

    ๐Ÿ› Bug fixes and other changes

    • Field mapping does not work for nested target properties (#1155)
    • ๐Ÿ‘ท Use Travis CI for PRs (#1171)
    • โž• Add Codecov for coverage integration within PRs (#1194)
    • ๐Ÿ‘‰ Make sure that all import types of a Type are imported for the collection and map wrappers (#1164) PR #1165
    • Do not use invalid TargetReferences when creating nested target mappings (#1153)
    • Nested target properties uses same method for different mappings (#1148)
    • โฌ†๏ธ Regression: Missing import when upgrading to 1.2.0.Beta2 (#1215)
    • Don't use equals and hashCode from TypeMirror (#1129)

    Behavior changes:

    • โšก๏ธ Make sure we don't do a null check all the time for SetterWrapperForCollections (#1164) PR #1175 - behavior change: Add branch for explicit set to null for not present collections in create methods, there is no behavior change in update methods. E.g.

    Before:

    List\<String\> list = source.getStrings();if ( list != null ) { domain.setStrings( new HashSet\<String\>( list ) ); }if ( source.hasStrings() ) { List\<String\> list = source.getStrings(); domain.setStrings( new HashSet\<String\>( list ) ); }
    

    After:

    List\<String\> list = source.getStrings();if ( list != null ) { domain.setStrings( new HashSet\<String\>( list ) ); }else { domain.setStrings( null ); }if ( source.hasStrings() ) { List\<String\> list = source.getStrings(); domain.setStrings( new HashSet\<String\>( list ) ); }else { domain.setStrings( null ); }
    
    • No automatic sub-mapping methods will be generated between some custom type and some type declared in the Java class library (#1154) PR #1183