Sjaak Derksen
8478a5455b
#2278 inherited property ignored due to ignore on nested level ( #2332 )
...
Co-authored-by: sjaakd <sjaakderksen@zonnet.nl>
2021-01-23 09:15:46 +01:00
Filip Hrisafov
dfc7528096
Small fixes for Java 16
...
* Upgrade japicmp-maven-plugin to 0.15.2
* Do not use deprecated for removal Long constructor
* Update Spring to 5.3.3
* Upgrade Lombok to 1.18.16 + add lombok-mapstruct-binding
2021-01-22 08:33:03 +01:00
Tomas Poledny
4223e3ab81
#2255 Add constants for componentModel
2021-01-17 15:13:42 +01:00
Filip Hrisafov
700293f089
#2301 Implicitly ignore forward inherited mappings from different method types
2021-01-01 21:30:25 +01:00
Filip Hrisafov
f84f756a4c
#2293 Use MapperConfig instead of MappingConfig in the documentation
2021-01-01 21:29:48 +01:00
Filip Hrisafov
84c3bda5a2
#2274 , #2023 Fix problems with property mapping using source parameters
...
Fixes problems when property mapping is using source parameter and has default value / expression or is doing an update
2020-11-22 13:04:26 +01:00
Filip Hrisafov
6df9243d92
#2253 remove unmapped source properties when source parameter is directly mapped
2020-11-08 09:57:10 +01:00
Filip Hrisafov
75f963adf6
#2263 Fix IndexOutOfBoundsException when resolving TypeVar to a Type
2020-11-08 09:56:15 +01:00
Filip Hrisafov
749ded96c1
#2251 Fix incorrect code generated for constructor mapping from implicit source parameter matching
2020-11-01 14:59:44 +01:00
Filip Hrisafov
3256abb79c
#2244 Mark mapstruct-processor jar as Spring-Boot-Jar-Type: annotation-processor
...
Doing this would make sure that starting from Spring Boot 2.4 the mapstruct-processor will not be included in the fat jar produced by the Spring Boot maven plugin if people have it as a maven provided dependency.
This is an alternative if people are not using the maven-compiler-plugin annotationProcessorPaths
2020-10-28 08:54:01 +01:00
Filip Hrisafov
85890dd442
#2245 Local variable should be created when using default value
2020-10-25 14:42:48 +01:00
Kemal Ozcan
e67daa3710
mapstruct#597 Built-In conversion between String and StringBuilder
2020-10-24 17:33:53 +02:00
Saheb Preet Singh
26f62b7ef0
#607 Mapping Iterable<?> object to an object instead of collection
2020-10-21 21:20:46 +02:00
Sjaak Derksen
c2e8034030
861 remove compiler specific workarounds ( #2227 )
2020-10-21 20:02:28 +02:00
Filip Hrisafov
74d06fea5d
#2233 Allow generic of generics in types when matching
...
e.g. method signature such as
<T> T fromOptional(Optional<T> optional)
when T resolves to another generic class such as Collection<String>
2020-10-21 17:00:05 +02:00
Filip Hrisafov
6102d0cc8e
#2236 Different nested target mappings should generate different intermediate methods
...
Make sure that MappingReferences are taken into consideration when comparing whether 2 mapping methods are equal.
This makes sure that when using nested target mappings that have the same property mappings, but different mappings 2 distinct methods will be created
2020-10-18 22:31:08 +02:00
Filip Hrisafov
58dbaee472
[maven-release-plugin] prepare for next development iteration
2020-10-11 09:35:30 +02:00
Filip Hrisafov
d8f22f8311
[maven-release-plugin] prepare release 1.4.1.Final
2020-10-11 09:35:30 +02:00
Filip Hrisafov
53a5c34ed6
#2206 , #2214 , #2220 : Source property should be correctly determined when only target is defined
...
When having multiple source properties and only target is defined then the same rules should be applied as if there was no mapping:
* First we check for a matching property in any of the source type
* Second we check if the parameter name matches
2020-10-10 09:44:01 +02:00
Filip Hrisafov
a5f49e591e
#2221 : Fix configuration inheritance when there are multiple matching source parameters of the same type
2020-10-10 09:43:30 +02:00
Filip Hrisafov
823b5edd9f
#2213 : primitive arrays should be directly mapped (we are cloning them anyways)
...
Additionally fix problem when annotations `ElementType.TYPE_USE` not handled correctly for javac
2020-10-03 16:54:01 +02:00
Filip Hrisafov
233fc6de98
#2215 : Avoid NPE in IntelliJ EAP 2020.3
...
Starting from IntelliJ 2020.3 (Build 203.4203.26) the ProcessingEnvironment is wrapped in a Proxy class by IntelliJ.
MapStruct should gracefully handle that and not throw an NPE.
Additionally, we should do best effort to put the used compiler in the generated annotation info
2020-10-03 16:47:31 +02:00
Jasper Vandemalle
4480e0f367
Fix minor typos
2020-10-03 00:35:28 +02:00
Filip Hrisafov
eb5b8bb71e
[maven-release-plugin] prepare for next development iteration
2020-09-26 10:20:47 +02:00
Filip Hrisafov
9973b92ccb
[maven-release-plugin] prepare release 1.4.0.Final
2020-09-26 10:20:45 +02:00
Filip Hrisafov
060f17e3e2
#2125 Report an error when source parameter could not be determined from target mapping
2020-09-21 07:55:45 +02:00
Filip Hrisafov
e17e744b20
Dependency upgrades
...
Upgrades:
* Maven Enforcer Plugin to 3.0.0-M3
* Maven Surefire Plugin to 3.0.0-M5
* Maven Checkstyle Plugin to 3.1.1
* Maven Bundle Plugin to 5.1.1
* Jacoco Maven Plugin to 0.8.6
* Checkstyle to 8.36.1
* JUnit Jipiter to 5.7.0
* AssertJ to 3.17.2
* Guava to 29.0-jre
Fix AssertJ breaking changes
Use Java 8 or Apache Commons IO instead of Guava where possible
Update GitHub Actions to use JDK 14 and JDK 15-ea
2020-09-20 11:37:23 +02:00
Filip Hrisafov
52ab22bbd8
#2197 Strip leading underscores and digits when sanitizing identifier name
2020-09-20 09:46:41 +02:00
Sjaak Derksen
427f5023ef
#2195 @Beanmapping#resultType should be used to construct return type also if it's a builder ( #2196 )
2020-09-06 16:12:01 +02:00
Filip Hrisafov
8b22654abd
[maven-release-plugin] prepare for next development iteration
2020-08-30 16:31:45 +02:00
Filip Hrisafov
c962962546
[maven-release-plugin] prepare release 1.4.0.CR1
2020-08-30 16:31:44 +02:00
Sjaak Derksen
e0eb0f6bb8
#2164 parameter matching should be done based on name when source name is absent ( #2193 )
2020-08-30 12:49:09 +02:00
Filip Hrisafov
7dcbef349d
#2169 Add support for defining a custom unexpected value mapping exception
...
Expose definition via:
* `@EnumMapping`
* `@Mapper`
* `@MapperConfig`
* `EnumMappingStrategy` SPI
Rename `EnumNamingStrategy` to `EnumMappingStrategy`
2020-08-29 13:53:30 +02:00
Filip Hrisafov
a9451b1159
#2185 Fix StackOverflow error when recursive use of mapper in Mapper#uses
2020-08-29 11:56:02 +02:00
Filip Hrisafov
c1feafef4c
#2177 Mapping into a generic class / record with a typed constructor argument should work
2020-08-29 11:22:18 +02:00
Filip Hrisafov
3ce9786cf6
#2174 Forged methods should inherit all thrown exceptions from their property mappings
2020-08-29 08:59:20 +02:00
Filip Hrisafov
ed16d62a91
#2170 Make sure that an import is created for constructor mapping defined variables
2020-08-02 09:36:22 +02:00
Filip Hrisafov
609824037b
#2167 Add missing @since 1.4 to new interfaces, classes and methods
2020-08-01 11:43:46 +02:00
Sjaak Derksen
2e2c20fed7
#2161 use short names instead of FQN's in error messages ( #2166 )
2020-07-24 23:19:47 +02:00
Filip Hrisafov
ef4bfc9aad
[maven-release-plugin] prepare for next development iteration
2020-07-19 18:10:13 +02:00
Filip Hrisafov
1d223284c2
[maven-release-plugin] prepare release 1.4.0.Beta3
2020-07-19 18:10:12 +02:00
Filip Hrisafov
0495cb7fa7
#2149 Do not allow using BeanMapping(ignoreByDefault = true) in combination with Mapping(target = ".")
...
This fixes an ArrayIndexOutOfBoundsException when they were used together
2020-07-19 16:19:52 +02:00
Filip Hrisafov
28017e2b0c
Add test case for demonstrating how the ignoreByDefault can be overridden from the base configuration
2020-07-19 16:19:52 +02:00
Sjaak Derksen
36349c49e9
#2156 ambiguous mapping message: location and limit # candidates ( #2162 )
2020-07-19 15:40:30 +02:00
Filip Hrisafov
cb432fa61b
#2150 Change the rules for how a constructor for mapping is picked
...
New rules:
1. Constructor annotated with @Default (from any package) has highest precedence
2. If there is a single public constructor then it would be used to construct the object
3. If a parameterless constructor exists then it would be used to construct the object, and the other constructors will be ignored
2020-07-18 18:53:32 +02:00
Filip Hrisafov
6aa39ff428
#2142 : Strip leading underscore when sanitizing identifier name
2020-07-18 11:35:25 +02:00
Sjaak Derksen
2a849dca12
#2145 fixing 2 step mapping methods (refactoring) ( #2146 )
2020-07-18 01:12:21 +02:00
Sjaak Derksen
74f281fa3e
#2135 improved messages for not able to select qualified method ( #2141 )
...
* #2135 improved messages for not able to select qualified method
2020-07-18 01:12:15 +02:00
Sjaak Derksen
c0d88f86bf
#2139 reproducer ( #2140 )
...
* #2139 reproducer
* #2139 solution
* #2139 license
2020-07-18 01:12:11 +02:00
Filip Hrisafov
2fede3583d
[maven-release-plugin] prepare for next development iteration
2020-07-18 01:12:05 +02:00