Skip to content

Conversation

@Zegveld
Copy link
Contributor

@Zegveld Zegveld commented Dec 30, 2022

closes #3125

Copy link
Member

@filiphr filiphr left a comment

Choose a reason for hiding this comment

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

Looks good to me @Zegveld. I've added one comment in order to avoid the need of the TypeUtils in the MappingMethodOptions

return false;
}
for ( int i = 0; i < templateMethod.getParameters().size(); i++ ) {
if (!typeUtils.isSameType( templateMethod.getParameters().get( i ).getType().getTypeMirror(),
Copy link
Member

Choose a reason for hiding this comment

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

I think that here we can just use tempalteMethod.getParameter.get( i ).getType().equals( sourceMethod.getParameters().get( i ).getType() )

}

private boolean resultTypeIsTheSame(SourceMethod templateMethod, SourceMethod sourceMethod) {
return typeUtils.isSameType( templateMethod.getResultType().getTypeMirror(),
Copy link
Member

Choose a reason for hiding this comment

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

Same here we can use the equals of the type

@filiphr filiphr merged commit 2f78d3f into mapstruct:main Apr 30, 2023
@filiphr
Copy link
Member

filiphr commented Apr 30, 2023

Thanks @Zegveld

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support @InheritConfiguration for @SubclassMapping in methods with identical signature

2 participants