#2897 Always import types defined in `Mapper#imports` by filiphr · Pull Request #2972 · mapstruct/mapstruct

sjaakd

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion for naming added


for ( TypeMirror extraImport : mapperOptions.imports() ) {
Type type = typeFactory.getType( extraImport );
Type type = typeFactory.getAlwaysImportedType( extraImport );

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would explicit be a better term? Or even explicitImportByMappingAnnotation..

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some javadoc otherwise..

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I named it getAlwaysImportedType because we might need to use it for something else in the future. You never know what can happen.

I'll add Javadoc though