mirror of
https://github.com/mapstruct/mapstruct.git
synced 2025-07-12 00:00:08 +08:00
#729 Fix trying to resolving constructor on primitive types
This commit is contained in:
parent
01322e0a9c
commit
39158f649f
@ -543,6 +543,10 @@ public class MappingResolverImpl implements MappingResolver {
|
|||||||
* otherwise.
|
* otherwise.
|
||||||
*/
|
*/
|
||||||
private boolean hasCompatibleCopyConstructor(Type sourceType, Type targetType) {
|
private boolean hasCompatibleCopyConstructor(Type sourceType, Type targetType) {
|
||||||
|
if ( targetType.isPrimitive() ) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
List<ExecutableElement> targetTypeConstructors = ElementFilter.constructorsIn(
|
List<ExecutableElement> targetTypeConstructors = ElementFilter.constructorsIn(
|
||||||
targetType.getTypeElement().getEnclosedElements() );
|
targetType.getTypeElement().getEnclosedElements() );
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user