mirror of
https://github.com/mapstruct/mapstruct.git
synced 2025-07-12 00:00:08 +08:00
#373 Removing superfluous null check when mapping parameter directly.
This commit is contained in:
parent
c551a2d27d
commit
4730ded4d8
@ -189,6 +189,7 @@ public class PropertyMapping extends ModelElement {
|
||||
if ( targetAccessorType == TargetAccessorType.SETTER ) {
|
||||
result = new SetterWrapper( result, method.getThrownTypes() );
|
||||
if ( !sourceType.isPrimitive()
|
||||
&& !sourceReference.getPropertyEntries().isEmpty() /* parameter null taken care of by beanmapper */
|
||||
&& ( result.getType() == TYPE_CONVERTED
|
||||
|| result.getType() == TYPE_CONVERTED_MAPPED
|
||||
|| result.getType() == DIRECT && targetType.isPrimitive() ) ) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user