Filip Hrisafov
2b2299a730
#73 Add support for using constructor arguments when instantiating mapping targets
...
By default the constructor argument names are used to extract the target properties.
If a constructor is annotated with an annotation named `@ConstructorProperties` (from any package) then it would be used to extract the target properties.
If a mapping target has a parameterless empty constructor it would be used to instantiate the target.
When there are multiple constructors then an annotation named `@Default` (from any package) can be used to mark a constructor that should be used by default when instantiating the target.
Supports mapping into Java 14 Records and Kotlin data classes out of the box
2020-04-26 12:44:41 +02:00
Sjaak Derksen
7c62aec281
#2077 nullpointer due to no-getter source ( #2078 )
2020-04-25 17:01:22 +02:00
Filip Hrisafov
3bffe96983
#1159 : Do not fail loading AnnotationProcessorContext if loading AstModifyingAnnotationProcessor fails
2020-04-13 17:40:47 +02:00
Filip Hrisafov
c58f80cc5f
#2069 Refactor target reference to report errors during bean mapping instead of creation of the target reference
...
With this we can more easily go in the direction of using constructor to map into target beans.
2020-04-13 13:20:09 +02:00
Filip Hrisafov
1bbc4e1ca8
Use expected.getMessageRegex when no message for the Diagnostic descriptor has been defined
2020-04-12 12:26:07 +02:00
Filip Hrisafov
6797afb647
Use exact message for Diagnostic test messages assertions
2020-04-12 09:55:44 +02:00
Filip Hrisafov
c410379f83
#1553 : Update tycho-compiler-jdt to latest 1.6.0 version
...
Disable one test in GenericsHierarchyTest for Eclipse on Java 8 due to a bug in the Tycho compiler.
Disable freeBuilder integration test for Eclipse since there are some problems in the second round of annotation processing (no ModelElementProcessor(s) are found)
2020-04-10 09:33:09 +02:00
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
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
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
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
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
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
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
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
Sjaak Derksen
e12f9ffd7b
Refactoring of BeanMapping and Source/TargetReferences (common base class) ( #1903 )
2019-09-13 19:41:06 +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
dbe761e738
Fix minor warnings in packages test and testutil:
...
remove unnecessary generic types for collection,
replace numbers months on Calendar constants,
remove unnecessary exceptions from signature test methods
2019-08-18 15:53:50 +02:00
Andrei Arlou
1ee59fd123
Fix minor warnings in tests, packages internal, spi and some others packages:
...
remove unnecessary generic-type in collections, simplify conditions,
remove unnecessary exception from signature,
replace months numbers on Calendar constants
2019-08-18 12:20:07 +02:00
Andrei Arlou
148466ae3e
Fix minor warnings in package test.collection:
...
remove unnecessary generic-type in collections,
remove unnecessary exception from signature,
replace months numbers on Calendar constants
2019-08-18 12:13:40 +02:00
Andrei Arlou
dc86d5df45
Fix minor warnings in test packages java8stream and nestedbeans:
...
remove unnecessary generic types from collection,
remove unnecessary throws from test methods,
simplify equals in test dto
2019-08-18 12:11:01 +02:00
Andrei Arlou
281b792cf6
Fix minor warnings in test package bugs:
...
remove unnecessary generic type for collections,
remove unnecessary exceptions from signature test methods
2019-08-18 10:11:57 +02:00
Sjaak Derksen
7bee12138d
#1307 & #1845 remove deprecated enummapping & create ST - refs under bean mapping
...
#1307 remove deprecated enum mapping
#1845 create source / target references under bean mapping
2019-07-18 07:20:22 +02:00
Jonathan Kraska
119826982a
#1826 : fixed null pointer in nested property mapping when using presence checking ( #1827 )
2019-05-26 17:41:44 +02:00
Sjaak Derksen
d50e41cdbb
#1776 adding a message when no qualifiers are found ( #1786 )
2019-05-25 18:14:00 +02:00
Sjaak Derksen
33710584d3
#1742 & #1661 refactoring and making builder optional ( #1811 )
2019-05-24 23:30:16 +02:00
Filip Hrisafov
60c159a0a1
#1751 Fix handling of possible builder creation methods with generic signature
...
When a method has a generic signature and the builder type is generic then the method return type does not match the builder type.
Therefore check only for raw types.
Add extra check for void method since a void method can't be a builder creation method
2019-05-24 23:26:25 +02:00
Filip Hrisafov
1415e32761
#1797 Use EnumSet.noneOf when creating a new instance of EnumSet
2019-05-05 12:42:25 +02:00
Sjaak Derksen
da8c1d0e4b
#1772 unmapped source prop remaining when target and source entry diff ( #1778 )
2019-04-07 21:37:36 +02:00