-
Notifications
You must be signed in to change notification settings - Fork 680
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
Bugfix/1430 do not get unused value #1431
Bugfix/1430 do not get unused value #1431
Conversation
* using diamonds instead of explicit types; * using already casted variable; * using StringBuilder instead of String concatenation in loop; * remove unnecessary method argument; * remove redundant if-statement; * using unwrap() instead of getDelegate() and type cast.
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.
@xael-fry LTGT. Recommended to merge.
I notice you've tidied up the section of code which started: Then proceeded to cascade the changes whether or not the collection was initialised. My question: we've observed that this code causes saveOrCascade to load collections that cannot have had any modifications (as they're not currently loaded) before saving - which has led to performance issues. Is there a good reason for this behaviour? I assume so, but it would be good to know what that reason is. |
@straycat264, my changes didn't change code behaviour. It wasn't the goal of this PR. The code in the if and else branches was the same, except that the PersistenceCollection in the if branch was passed through a cast of In my opinion, your question should be moved to separate ticket. Perhaps here should use the approach used to processing PersistenceMap and do nothing if the collection is not initialized. |
Merge in master |
This line was removed in this commit - why? |
@JohannesBeranek I don't remember the details, but I believe the resulting code is effectively the same. I think it was a refactoring suggested by IDEA: it removed duplicated/unneeded line, thus leading to a shorter code that does the same job. |
Some cleanup and fix #1430