MapStruct v1.4.0.CR1 Release Notes

Release Date: 2020-08-30 // 19 days ago
  • ๐Ÿ”‹ Features

    • ๐Ÿ‘Œ Support custom unexpected enum constant exception for Value (Enum) Mapping (#2169)

    โœจ Enhancements

    • ๐Ÿ‘‰ Use short names instead of FQN's in error messages (PR #2166)
    • ๐Ÿ‘ป Redundant exception wrapping in nested generated method (#2174)
    • โš  StackOverflow caused by recursive uses declaration (#2185) - There is now a compile warning instead of a stack overflow error

    ๐Ÿ› Bug fixes

    • Missing import in generated mapping class when using generic mapper interface (#2170)
    • Mapping to generic class via constructor does not work (#2177)
    • Parameter no longer recognised in 1.4 when not explicitly mentioned (#2164)

    ๐Ÿ“š Documentation

    • โž• Add @since 1.4 to new interfaces (#2167)
    • ๐Ÿ›  Fix typos

Previous changes from v1.4.0.Beta3

  • โœจ Enhancements

    • ๐Ÿ‘Œ Improve the error message when using @Qualifier in 2 step mapping methods (#2135)
    • Strip leading underscore when in local variable names (#2142)
    • ๐Ÿ‘ Allow @Default to overrule potentially existing parameterless default constructor. (#2150) - With this we actually changed the rules for selection a constructor. Now the following is done:
      • Constructor annotated with @Default (from any package) has highest precedence
      • If there is a single public constructor then it would be used to construct the object
      • If a parameterless constructor exists then it would be used to construct the object, and the other constructors will be ignored
    • ๐Ÿ‘Œ Improve ambiguous method error description (#2156)

    ๐Ÿ› Bug fixes

    • NullPointerException when using only Mapping#target in mapping inheritance (#2139)
    • Selection JAXB object factory has been compromised between 1.3.1.Final and 1.4.0Beta2 (#2145)
    • 0๏ธโƒฃ Internal error in the mapping processor: java.lang.ArrayIndexOutOfBoundsException: 0 (#2149) - This was caused by using @BeanMapping(ignoreByDefault = true) in combination with @Mapping(target = "."). This is now not allowed