simplified some expressions, redundant expressions removed by anton-erofeev · Pull Request #3292 · mapstruct/mapstruct
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this cleanups @anton-erofeev. I only have one small remark, see my comment
Comment on lines +501 to +500
| for (Iterator<? extends TypeMirror> iterator = unusedPermittedSubclasses.iterator(); | ||
| iterator.hasNext(); ) { | ||
| if ( ctx.getTypeUtils().isSameType( iterator.next(), subClassOption.getSource() ) ) { | ||
| iterator.remove(); | ||
| } | ||
| } | ||
| unusedPermittedSubclasses.removeIf( | ||
| typeMirror -> ctx.getTypeUtils().isSameType(typeMirror, subClassOption.getSource())); |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like this change because it means that a new anonymous class has to be created to capture the subClassOption. I prefer not to create new objects for things like this
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I reverted this change, thanks
@anton-erofeev seems like there are some formatting issues. Can you have a look at it please?
@anton-erofeev seems like there are some formatting issues. Can you have a look at it please?
updated but it looks like I can't run checks
You are contributing for the first time @anton-erofeev and that's why the checks don't run automatically. I need to approve them in order for them to run. Just did that, if everything is OK, we'll merge this. For your next contributions this won't be necessary.