Initialize transient fields with empty HashMap instead of null#9030
Initialize transient fields with empty HashMap instead of null#9030scolapasta merged 1 commit intoIQSS:developfrom
Conversation
pdurbin
left a comment
There was a problem hiding this comment.
@janvanmansum thanks! There is another proposed fix here:
|
Hi. Both fixes have exactly the same effect: assigning empty hash sets i.s.o. null to these fields. However, #8969 is more defensive, as it ensures that newly created users are initialized exactly the same way as the users loaded from the DB. If anything changed in the future, both ways of initialization of the users (the only ones that I am aware of) reuse the same code to ensure a consistent state of the |
|
The only advantage of #9030 I could point out is that |
|
This one will be resolved by #8969 and can be closed |
What this PR does / why we need it:
It resolves a bug in the
ShowMuteOptionsfeature.Which issue(s) this PR closes:
Closes #9029
Special notes for your reviewer:
It seems
edu.harvard.iq.dataverse.authorization.users.AuthenticatedUser#postLoadis not executed in the scenario described in the issue (user was just created by a first federated login).Suggestions on how to test this:
Does this PR introduce a user interface change? If mockups are available, please link/include them here:
No
Is there a release notes update needed for this change?:
No
Additional documentation:
N/a