#544 avoid that implementationtypes are added to imports in case of parameterized types

This commit is contained in:
sjaakd 2015-05-17 21:15:41 +02:00
parent 5ed7caedee
commit 0890257700
3 changed files with 6 additions and 4 deletions

View File

@ -179,6 +179,9 @@ public class IterableMappingMethod extends MappingMethod {
} }
if ( ( factoryMethod == null ) && ( !isExistingInstanceMapping() ) ) { if ( ( factoryMethod == null ) && ( !isExistingInstanceMapping() ) ) {
types.addAll( getReturnType().getImportTypes() ); types.addAll( getReturnType().getImportTypes() );
if ( getReturnType().getImplementationType() != null ) {
types.addAll( getReturnType().getImplementationType().getImportTypes() );
}
} }
return types; return types;
} }

View File

@ -217,6 +217,9 @@ public class MapMappingMethod extends MappingMethod {
} }
if ( ( factoryMethod == null ) && ( !isExistingInstanceMapping() ) ) { if ( ( factoryMethod == null ) && ( !isExistingInstanceMapping() ) ) {
types.addAll( getReturnType().getImportTypes() ); types.addAll( getReturnType().getImportTypes() );
if ( getReturnType().getImplementationType() != null ) {
types.addAll( getReturnType().getImplementationType().getImportTypes() );
}
} }
return types; return types;

View File

@ -268,10 +268,6 @@ public class Type extends ModelElement implements Comparable<Type> {
result.add( this ); result.add( this );
if ( implementationType != null ) {
result.addAll( implementationType.getImportTypes() );
}
if ( componentType != null ) { if ( componentType != null ) {
result.addAll( componentType.getImportTypes() ); result.addAll( componentType.getImportTypes() );
} }