-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[Envers] HHH-17652 Fix NullPointerException when mapping audited many-to-one relationships #7715
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
Conversation
…elationships fixes b384b37
|
Thanks for your pull request! This pull request appears to follow the contribution rules. › This message was automatically generated. |
mbellade
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@csaadaam thank you for your contribution! Sorry for taking so long, we have a long backlog of issues and we're trying to get to pending PRs.
I've left a small comment about code style, but other than that, your change looks reasonable to me. I would ask you to please include a test in your PR which ensures the NPE has been fixed by your changes and prevents us from re-introducing a regression in the future.
| if (referencedEntity.isAudited()) { | ||
| return false; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please follow our code style guidelines.
| if (referencedEntity.isAudited()) { | |
| return false; | |
| } | |
| if ( referencedEntity.isAudited() ) { | |
| return false; | |
| } |
|
We're also in the process or investigating a move to the Apache Software License v2. If you agree with allowing this change to be relicensed under that license, please add this text to the subject - By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license |
|
@csaadaam I took the liberty of looking into this issue and found that while your solution resolved the problem with your use-case it caused errors in several envers tests verifying the correct functionality of audited entities using not-found relationships. I've added a test case and proposed a working fix here: #9453 |
@mbladel Thank you very much for looking into it and fixing it! |
fixes b384b37
https://hibernate.atlassian.net/browse/HHH-17652