1399 Commits

Author SHA1 Message Date
Filip Hrisafov
0e902d6412 Update versions in readme to 1.4.1.Final 1.4.1.Final 2020-10-11 10:00:24 +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
2b95e07d8e Turn of Maven connection pooling to avoid connection issues on CI
The problem and solution are explained in https://github.com/actions/virtual-environments/issues/1499#issuecomment-689467080
2020-10-10 10:22:43 +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
2d750193d1 Update versions in readme to 1.4.0.Final 2020-09-26 11:45:27 +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 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 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
Makoto Oda
99a1fd609c
Documentation: typo? (#2186) 2020-08-25 20:38:19 +02:00
Makoto Oda
18a5f1bdc0
Documentation: Extra phrase inserted? (#2187) 2020-08-25 20:37:02 +02:00
Makoto Oda
e6279d10c7
Is 'r' missing? (#2188) 2020-08-25 20:34:02 +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 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
Filip Hrisafov
fc4f65ddb6 [maven-release-plugin] prepare release 1.4.0.Beta2 1.4.0.Beta2 2020-07-05 23:11:41 +02:00
Sjaak Derksen
12ac348609
#2136 performance improvement 2 step mappings (#2138) 2020-07-04 22:06:30 +02:00
Sjaak Derksen
1ce282362c
#2101 inherited properties need to be analysed against redefined properties when inheriting mappings (#2103) 2020-07-04 21:50:20 +02:00
Sjaak Derksen
971abc48c7
#2122 fix for 2 step mapping and generics (#2129) 2020-07-04 18:49:33 +02:00
Sjaak Derksen
81a88bdb6c
#2133 @BeanMapping#resultType should not be applied to forged methods (#2134)
* #2133 reproducer

* #2133 solution
2020-07-04 18:20:09 +02:00
Filip Hrisafov
082704cc55 #2131 Add extra test case 2020-07-04 17:27:55 +02:00
SahinSarkar
13df6a21bc Fixed typo in documentation 2020-07-04 16:55:24 +02:00
Filip Hrisafov
92b4316abd #2117 Add extra test case 2020-06-21 23:47:02 +02:00
Filip Hrisafov
bdc58b9602 #2124 Add extra test case 2020-06-21 23:24:56 +02:00
Filip Hrisafov
ef3cbc1b36 #2121 Add extra test case 2020-06-21 23:19:23 +02:00