mirror of
https://github.com/mapstruct/mapstruct.git
synced 2025-07-12 00:00:08 +08:00
#544 fix unused imports due to existing mapping target
This commit is contained in:
parent
4a2f0c01ec
commit
ac1f9aeaa5
@ -177,7 +177,7 @@ public class IterableMappingMethod extends MappingMethod {
|
|||||||
if ( elementAssignment != null ) {
|
if ( elementAssignment != null ) {
|
||||||
types.addAll( elementAssignment.getImportTypes() );
|
types.addAll( elementAssignment.getImportTypes() );
|
||||||
}
|
}
|
||||||
if ( factoryMethod == null ) {
|
if ( ( factoryMethod == null ) && ( !isExistingInstanceMapping() ) ) {
|
||||||
types.addAll( getReturnType().getImportTypes() );
|
types.addAll( getReturnType().getImportTypes() );
|
||||||
}
|
}
|
||||||
return types;
|
return types;
|
||||||
|
@ -215,7 +215,7 @@ public class MapMappingMethod extends MappingMethod {
|
|||||||
if ( valueAssignment != null ) {
|
if ( valueAssignment != null ) {
|
||||||
types.addAll( valueAssignment.getImportTypes() );
|
types.addAll( valueAssignment.getImportTypes() );
|
||||||
}
|
}
|
||||||
if ( factoryMethod == null ) {
|
if ( ( factoryMethod == null ) && ( !isExistingInstanceMapping() ) ) {
|
||||||
types.addAll( getReturnType().getImportTypes() );
|
types.addAll( getReturnType().getImportTypes() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user