1123 Commits

Author SHA1 Message Date
Filip Hrisafov
4f76208c62 #2021 Generate compilable code when Decorator is nested within the Mapper
We need to treat the import of the decoratorType specially when it is nested.
Calling addIfImportRequired is not the most correct approach since it would
lead to checking if the type is to be imported and that would be false
since the Decorator is a nested class within the Mapper.
However, when generating the Decorator this is not needed, because the Decorator is a top level class itself

In a nutshell creating the Decorator should have its own ProcessorContext, but it doesn't
2020-04-05 14:09:23 +02:00
Filip Hrisafov
63c2edd333 Reset locale and time zone in every test 2020-03-07 16:44:19 +01:00
Filip Hrisafov
fe91c6d523 Disable Checkstyle for Target for #2018 test 2020-02-23 19:06:46 +01:00
Filip Hrisafov
b9f86fe6ac #2018 Add test case with properties with underscore verifying that it is working as expected 2020-02-23 17:33:32 +01:00
Filip Hrisafov
f5771c4177 #2014 Add support for mapping from Java 14 records 2020-02-23 13:34:08 +01:00
Tim J. Baumann
a6b3cc364a Fix Javadoc of resolveViaMethodAndConversion
and fix some smaller Javadoc typos.
2020-02-07 17:38:59 +01:00
Filip Hrisafov
95ceba1a1e #2016 Update Checkstyle to 8.29
Adapt checkstyle configuration with new changes:
* Move cacheFile to Checker module
* Move LineLength to Checker module
* Use SuppressWithPlainTextCommentFilter
2020-02-02 14:33:45 +01:00
Sjaak Derksen
58da2d293f
#695 user control over mapping means (direct, method, conversion, 2step) 2020-02-02 10:05:26 +01:00
Sjaak Derksen
2d3761051a
#2011 Introduce gem as replacement of hickory:prism (#2007) 2020-01-27 20:16:04 +01:00
sjaakd
6b49c838eb #1998 simplify usage of inheritance of annotation fields 2020-01-25 09:13:50 +01:00
sjaakd
b84526b24a #1998 preparation move classes to new names 2 2020-01-25 09:13:50 +01:00
sjaakd
2b36c220a3 #1998 preparation move classes to new names 1 2020-01-25 09:13:50 +01:00
Filip Hrisafov
d056570267 #2001 Avoid NPE when checking whether import type element is nested
When the typeToAdd is an array then TypeElement is null and ComponentType is the one that would be imported
2020-01-24 22:02:51 +01:00
ttzn
779eb1bd47 #1420 Add support for Gradle incremental annotation processing (#1971)
* Add relevant file in META-INF
* Add integration test with Gradle test kit dependencies
* Test with Gradle 5 and Gradle 6
2019-12-08 19:55:16 +01:00
Sjaak Derksen
ee794d042c
#807 meta annotations and duck typing (#1979) 2019-12-07 22:20:11 +01:00
Sjaak Derksen
071e5dc6b2
#1966 extra unit test (#1967) 2019-11-10 20:14:33 +01:00
Andrei Arlou
b26cd4e0cb
#1953 Fix TODO items for: integrationtest-java8Test, integrationtest-lombokBuilderTest, processor-nullvaluemappingTest (#1955) 2019-10-26 22:24:59 +03:00
Andrei Arlou
efea2fb662
#1951 Use Map.computeIfAbsent in NestedTargetPropertyMappingHolder (#1952) 2019-10-20 22:11:17 +03:00
Andrei Arlou
74a2e358e8 #1946 Simplify conditions in classes: Parameter, SelectionParameters, MethodReference, PropertyMapping 2019-10-20 21:01:58 +02:00
Andrei Arlou
e8a7832d5b
#1948 Fix minor warnings with using collection in package model and class util/workarounds/EclipseAsMemberOfWorkaround (#1949) 2019-10-20 14:16:26 +03:00
Andrei Arlou
fe37b01c65
#1944 Remove unused constants in JavaStreamConstants (#1945) 2019-10-20 14:13:38 +03:00
Sjaak Derksen
5fbc86d92f
#1788 allowing enum / not enum by removing checks (#1939) 2019-10-08 21:06:47 +02:00
Sjaak Derksen
507ec1b384
#1557 & #1936 String-to-enum and enum-to-String (#1938)
* #1557 making enum-to-string and string-to-enum

* #1936 <ANY_REMAINING> and <ANY_UNMAPPED> not ignored when inverting
2019-10-07 20:30:20 +02:00
Filip Hrisafov
44ae27d7ca #1881 Use ReportingPolicy#IGNORE for unmappedSourcePolicy when mapping references are for forged methods
This aligns with the way the ReportingPolicy is handled for unmappedTargetPolicy when mapping references are for forged methods
2019-10-06 21:05:25 +02:00
Sjaak Derksen
1cb8291fb9
#1933 ignoreByDefault not inherited from config (#1935) 2019-10-05 15:47:25 +02:00
Filip Hrisafov
b3023b3902
#1828 Use update method when nested property of target is populated with multiple nested properties of source (#1931) 2019-09-29 17:21:20 +02:00
Filip Hrisafov
999d428ad8 #1742 Add test case 2019-09-28 19:15:22 +02:00
Andrei Arlou
81cd439343 #1921 Fix minor warnings in testutil 2019-09-26 20:02:53 +02:00
Sjaak Derksen
0d23f09e37
#1918 multiple target this mappings (#1920) 2019-09-23 20:04:56 +02:00
Andrei Arlou
70de843bea
#1911 Change return type MapperConfiguration.getBuilderPrism from Optional<BuilderPrism> to BuilderPrism (#1912) 2019-09-22 20:41:35 +03:00
Sjaak Derksen
ade4f4d7e2
#1821 nullpointer due to @BeanMapping via inheritance (#1822) 2019-09-22 19:25:43 +02:00
Filip Hrisafov
1c4bbba442 #1799 Fluent setters starting with set should work properly 2019-09-22 19:09:04 +02:00
Dainius Figoras
88a8669642 #1406 targeting . as current object 2019-09-22 19:08:05 +02:00
dekelpilli
f84f6501c8 #1851 Do not allow using qualifiedBy and qualifiedByName with expression in Mapping 2019-09-22 13:53:19 +02:00
Andrei Arlou
55fe94a93e
#1914 Remove unused method Type.isAnnotatedWith (#1915) 2019-09-22 10:50:38 +03:00
Andrei Arlou
f4c9313972
#1791 Support for conversion between java.time.LocalDateTime and javax.xml.datatype.XMLGregorianCalendar (#1894) 2019-09-21 22:27:45 +03:00
Filip Hrisafov
fcdf852a17 #1904 Do not include private methods when getting enclosed executable elements 2019-09-21 21:10:58 +02:00
Filip Hrisafov
e92e3b45c6 #1904 Create compilation error if a mapper could not be created due to a TypeHierarchyErroneousException 2019-09-21 21:10:58 +02:00
Andrei Arlou
750ce48023 #1792 Annotation processor option for default injection strategy 2019-09-18 19:51:36 +02:00
Filip Hrisafov
d018aed251
#1790 Use mapperPrism.values.nullValuePropertyMappingStrategy when retrieving NullValuePropertyMappingStrategy 2019-09-18 13:09:40 +02:00
Sjaak Derksen
7e0327767f
#1801 Using constructor as builderCreationMethod in custom builder (#1905) 2019-09-15 21:43:22 +02:00
Andrei Arlou
c044a87969
#1889 Remove unused parameters from classes TargetTypeSelector, ValueMapping, MethodRetrievalProcessor (#1890) 2019-09-14 04:12:38 +03:00
Andrei Arlou
2043506179
#1895 Refactor class org.mapstruct.ap.internal.util.Filters (#1896) 2019-09-14 03:57:42 +03:00
Andrei Arlou
3868735da7
#1897 Remove unused methods from class SourceMethod (#1898) 2019-09-14 03:43:27 +03:00
Andrei Arlou
7af107c9f2
#1883 Remove not used method "asCollectionOrMap" from TypeFactory (#1884) 2019-09-14 03:24:43 +03:00
Andrei Arlou
f95648cef8
#1088 Refactor constructor ForgedMethod (#1888) 2019-09-14 03:03:13 +03:00
Sjaak Derksen
e12f9ffd7b
Refactoring of BeanMapping and Source/TargetReferences (common base class) (#1903) 2019-09-13 19:41:06 +02:00
Sjaak Derksen
6d9a50601e
#1867 refactor make the source model only a reflection of the source (#1868) 2019-09-12 20:21:39 +02:00
Andrei Arlou
8e37159a00 Fix minor warnings:
remove unnecessary generic type for collections,
remove unnecessary exceptions from signature,
fix typos
2019-08-24 09:23:58 +02:00
Andrei Arlou
55048ab045 Simplify consistent checks in class Mapping 2019-08-19 20:43:14 +02:00