github mapstruct/mapstruct 1.2.0.Beta3

latest releases: 1.6.0.Beta1, 1.5.5.Final, 1.5.4.Final...
pre-release6 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

Don't miss a new mapstruct release

NewReleases is sending notifications on new releases.