Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#3133 Redundant null check in generated code when adding parameters #3583

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

zyberzebra
Copy link

@zyberzebra zyberzebra commented Apr 28, 2024

fix for: #3133

  • verify redundant null checks in mappings are avoided
  • targets mapper methods that involve update mappings and ensures that null checks are not applied redundantly if already covered

@zyberzebra zyberzebra force-pushed the #3133-fix-Redundant-null-check-in-generated-code branch from 67239e1 to 7016d48 Compare April 28, 2024 18:34
- verify redundant null checks in mappings are avoided
- targets mapper methods that involve update mappings and ensures that null checks are not applied redundantly if already covered
- tests for multiple scenarios
@zyberzebra zyberzebra force-pushed the #3133-fix-Redundant-null-check-in-generated-code branch from 0b95442 to 464cc8b Compare April 29, 2024 18:22
Copy link
Author

Choose a reason for hiding this comment

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

I used the code formatter in IntelliJ: etc/mapstruct.xml
Imported here:
image

Copy link
Member

Choose a reason for hiding this comment

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

When you are formatting it is best to only format the changed lines and also when committing it is best to only stage changes that are not formatting changes.

I'll clean up the not needed formatting changes now, that's not a problem

Copy link
Author

Choose a reason for hiding this comment

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

Aaaah... makes sense! Thanks for clearing that up 😁

@zyberzebra zyberzebra force-pushed the #3133-fix-Redundant-null-check-in-generated-code branch from 9bc9826 to 82f7835 Compare May 7, 2024 17:03
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.

None yet

2 participants