1.5.0.Beta2
Pre-release
Pre-release
Features
- Support for Type-Refinement mapping (or Downcast Mapping) (#131, #366, #2438)
NullValueMappingStrategy
option to map collections/maps, but not beans (#2351)
Enhancement
- Diagnostics show up on non-Mapper types (#598)
- Generate imports only for top level classes (#1386)
- MapStruct should return the target object(which marking with
@MappingTarget
) when the source object is null (#1752) - See Behaviour Changes - Getting incorrect "iterable type to non-iterable type" error (#2005)
- Expose suppressTimestampInGenerated in
@Mapper
annotation (#2225) - Provide available case transformation when unknown is used in
CaseEnumTransformationStrategy
(#2525) - Add built in conversion between
URL
andString
(#2552) - Add
unmappedSourcePolicy
annotation processor argument (#2555)
Bugs
- Import handling in TypeFactory should deal with inner types bug (#148)
- Ambiguous constructors error message does not contain the ambiguous constructors (#2515)
- MapStruct 1.5.0.Beta1
ZonedDateTime
field mapping regression (#2530) - Issue with
unmappedSourcePolicy
and implicit source mapping (#2537) - TYPE_USE annotations on method parameters cause them not to match when using errorprone (#2541)
ReverseConversion
should maintainRequiredHelperMethods
(#2544)- New mapping feature not support property paths (#2553)
- Mapping List in Record causes warning (#2554)
BeanMapping#ignoreByDefault
interaction withunmappedSourcePolicy
(#2560)- Allow use of mapstruct in default package with nested classes (#2593)
- Record with "is" prefixed Boolean field causes unmapped source property report (#2596)
- FQN used when mapping
Stream
toArray
(#2614) - Cannot map nested target when mapping from
Map
to Bean (#2624) - Warning about unmapped not existing property (#2635)
@Condition
not working when the source in the Mapping is the source parameter (#2666)- Optional "wrapping" pattern broken with 1.5.0.Beta (#2673)
Documentation
- Document usage of qualifiers used together with
defaultValue
(#2636)
Build
Codebase Enhancements
- Refactor Accessors and remove not needed AccessorType(s) (#2680)
Behaviour Changes
Update mappings with a return type
Prior to this release update mappings with a return type returned null
when the source parameter was null
. However, this is not what a user expects (see #1752).
With this release methods like
Car updateCar(CarDto source, @MappingTarget Car car);
will always return the @MappingTarget
method, irregardless of what the source is.