1.5.0.Beta1
Pre-release
Pre-release
Features
- Support for Mapping from
Map<String, ???>
to Bean (#1075) - Conditional mapping (#2051, #2084) - Support for custom source presence checker expressions for mappings and custom method mappings
- Support mapping
Iterable<?>
object to an object instead of collection (#607) - Support for case changing enum transformation strategy #2445
- Built-In conversion between
String
<->StringBuilder
(#597) - Built-In conversion between a
UUID
to aString
(#2391) - Support throwing an exception as an Enum Mapping option (#2339)
Enhancement
- Add constants for
componentModel
inMappingConstants.ComponentModel
(#2255) - Reuse singleton
INSTANCE
(if it exists) in mapper references when using the default component model (#2277) - [Breaking Change] Retain iteration order for Sorted(Map|Set) values (#2303) - In order to keep the previous behaviour and use Hash(Map|Set) use an
@ObjectFactory
unmappedTargetPolicy
for@BeanMapping
(#2132)- Optimization: Make
java.time.format.DateTimeFormatter
instances final members (#2329) - [Breaking Change] Report ignored source properties which are missing (#2481) - Previously unknown properties in
BeanMapping#ignoreUnmappedSourceProperties
were ignored, now there will be a compile error as it is most likely a mistake. To fix the error the unknown properties should be removed fromBeanMapping#ignoreUnmappedSourceProperties
Bugs
- Multiple source properties with
defaultExpression
lead to unnecessary null checks and unexpected code (#2023) - MappingTarget member cannot be set to null (#2274)
- Import statement not being generated for custom type extending from an Iterable (#2352)
- Compilation failure when mapper interface is a private nested interface (#2347)
- When using
@ValueMapping
string-to-enum mapping results in no cases in switch (#2350) - Passing of mapping method argument to a property and using
@InheritInverseConfiguration
(#2356) - Incorrect mapper generated when upgrading from 1.2.0.Final to 1.4.2.Final (#2393)
- Several source parameters do not support "." (#2402)
- Source presence checks on collections with non direct mappings is ignored (#2423)
- Mapstruct mappers diamond inheritance, method is already defined (#2437)
- ObjectFactory with generic source not in generated code in after generics refactorings (#2463)\
- Variable is already defined in method (#2478)
- With wrong config like
Enum[]
to String, the mapping processor throws NPE (#2439) - JaxbElem not used when jaxb-api not on annotation processor path on Java 11 (#2491)
- DeepClone generates cloning method for Enums #2505
Documentation
- Make target the first parameter in all the uses of
@Mapping
(#2368) - Update documentation in regards to Java version (#2366)
- Document markdown syntax issues (#2385)
Build
- Adapt build for Java 16 (dfc7528)
- Migrate tests to use JUnit 5 (5bbd1a7, 2d66f08, 627be53)
- Integration Tests with Java 16 (#2466)
- Add records cross module integration test (#2375)
- Use JUnit Pioneer for setting Default Locale and Default Timezone (#2446)
- Update asciidoctor to latest versions (#2483)
- Make sure Javadoc can be generated with Java 11 (#2108) - Apiviz has been removed since it no longer works on Java 11
Codebase Enhancements
Breaking changes
The introduction of the mapping from Map<String, ???>
to Bean might have lead to some changes in how currently explicitly mapped maps are mapped. Some known changes are:
- Qualifiers for map sources as explained in #2549 (comment)
- Implicit map to map mappings as explained in #2764 (comment)