|
1 | 1 | ### Features |
2 | 2 |
|
3 | | -* Support for Java 21 Sequenced Collections (#3240) |
4 | | -* Native support for `java.util.Optional` mapping (#674) - MapStruct now fully supports Optional as both source and target types: |
5 | | - - `Optional` to `Optional` - Both source and target wrapped in `Optional` |
6 | | - - `Optional` to Non-`Optional` - Unwrapping `Optional` values |
7 | | - - Non-`Optional` to `Optional` - Wrapping values in `Optional` |
8 | | - - `Optional` properties in beans with automatic presence checks. Note, there is no null check done for `Optional` properties. |
9 | | -* Improved support for Kotlin. Requires use of `org.jetbrains.kotlin:kotlin-metadata-jvm`. |
10 | | - - Data Classes (#2281, #2577, #3031) - MapStruct now properly handles: |
11 | | - - Single field data classes |
12 | | - - Proper primary constructor detection |
13 | | - - Data classes with multiple constructors |
14 | | - - Data classes with all default parameters |
15 | | - - Sealed Classes (#3404) - Subclass exhaustiveness is now checked for Kotlin sealed classes |
16 | | -* Add support for ignoring multiple target properties at once (#3838) - Using new annotation `@Ignored` |
17 | | - |
18 | 3 | ### Enhancements |
19 | 4 |
|
20 | | -* Add support for locale parameter for numberFormat and dateFormat (#3628) |
21 | | -* Detect Builder without a factory method (#3729) - With this if there is an inner class that ends with `Builder` and has a constructor with parameters, |
22 | | -it will be treated as a potential builder. |
23 | | -Builders through static methods on the type have a precedence. |
24 | | -* Add support for custom exception for subclass exhaustive strategy for `@SubclassMapping` mapping (#3821) - Available on `@BeanMapping`, `@Mapper` and `@MappingConfig`. |
25 | | -* Add new `NullValuePropertyMappingStrategy#CLEAR` for clearing Collection and Map properties when updating a bean (#1830) |
26 | | -* Use deterministic order for supporting fields and methods (#3940) |
27 | | -* Support `@AnnotatedWith` on decorators (#3659) |
28 | | -* Behaviour change: Add warning/error for redundant `ignoreUnmappedSourceProperties` entries (#3906) |
29 | | -* Behaviour change: Warning when the target has no target properties (#1140) |
30 | | -* Behaviour change: Initialize `Optional` with `Optional.empty` instead of `null` (#3852) |
31 | | -* Behaviour change: Mark `String` to `Number` as lossy conversion (#3848) |
32 | | - |
33 | 5 | ### Bugs |
34 | 6 |
|
35 | | -* Improve error message when mapping non-iterable to array (#3786) |
36 | | -* Fix conditional mapping with `@TargetPropertyName` failing for nested update mappings (#3809) |
37 | | -* Resolve duplicate invocation of overloaded lifecycle methods with inheritance (#3849) - It is possible to disable this by using the new compiler option `mapstruct.disableLifecycleOverloadDeduplicateSelector`. |
38 | | -* Support generic `@Context` (#3711) |
39 | | -* Properly apply `NullValuePropertyMappingStrategy.IGNORE` for collections / maps without setters (#3806) |
40 | | -* Properly recognize the type of public generic fields (#3807) |
41 | | -* Fix method in Record is treated as a fluent setter (#3886) |
42 | | -* Ensure `NullValuePropertyMappingStrategy.SET_TO_DEFAULT` initializes empty collection/map when target is null (#3884) |
43 | | -* Fix Compiler error when mapping an object named `Override` (#3905) |
44 | | - |
45 | 7 | ### Documentation |
46 | 8 |
|
47 | | -* General Improvements |
48 | | - * Javadoc |
49 | | - * Typos in comments |
50 | | - * Small code refactorings |
51 | | - |
52 | 9 | ### Build |
53 | 10 |
|
54 | | -* Move Windows and MacOS builds outside of the main workflow |
55 | | -* Update release to release using the new Maven Central Portal |
56 | | -* Skip codecov coverage on forks |
57 | | -* Improve testing support for Kotlin |
58 | | - |
59 | | -### Behaviour Change |
60 | | - |
61 | | -#### Warning when the target has no target properties (#1140) |
62 | | - |
63 | | -With this change, if the target bean does not have any target properties, a warning will be shown. |
64 | | -This is like this to avoid potential mistakes by users, where they might think that the target bean has properties, but it does not. |
65 | | - |
66 | | -#### Warning for redundant `ignoreUnmappedSourceProperties` entries (#3906) |
67 | | - |
68 | | -With this change, if the `ignoreUnmappedSourceProperties` configuration contains properties that are actually mapped, a warning or compiler error will be shown. |
69 | | -The `unmappedSourcePolicy` is used to determine whether a warning, or an error is shown. |
70 | | - |
71 | | -#### Initialize `Optional` with `Optional.empty` instead of `null` (#3852) |
72 | | - |
73 | | -With this change, if the target `Optional` property is null, it will be initialized with `Optional.empty()` instead of `null`. |
74 | | - |
75 | | -#### Mark `String` to `Number` as lossy conversion (#3848) |
76 | | - |
77 | | -With this change, if the source `String` property is mapped to a `Number` property, a warning will be shown. |
78 | | -This is similar to what is happening when mapping `long` to `int`, etc. |
79 | | -The `typeConversionPolicy` `ReportingPolicy` is used to determine whether a warning, error or ignore is shown. |
0 commit comments