#544 fix unused imports due to existing mapping target

This commit is contained in:
sjaakd 2015-05-17 20:17:17 +02:00
parent 4a2f0c01ec
commit ac1f9aeaa5
2 changed files with 2 additions and 2 deletions

View File

@ -177,7 +177,7 @@ public class IterableMappingMethod extends MappingMethod {
if ( elementAssignment != null ) {
types.addAll( elementAssignment.getImportTypes() );
}
if ( factoryMethod == null ) {
if ( ( factoryMethod == null ) && ( !isExistingInstanceMapping() ) ) {
types.addAll( getReturnType().getImportTypes() );
}
return types;

View File

@ -215,7 +215,7 @@ public class MapMappingMethod extends MappingMethod {
if ( valueAssignment != null ) {
types.addAll( valueAssignment.getImportTypes() );
}
if ( factoryMethod == null ) {
if ( ( factoryMethod == null ) && ( !isExistingInstanceMapping() ) ) {
types.addAll( getReturnType().getImportTypes() );
}