Skip to content

[Eager Execution] Flip order of calling hashcode and getting as json#582

Merged
jasmith-hs merged 1 commit into
masterfrom
jasmith-patch
Jan 14, 2021
Merged

[Eager Execution] Flip order of calling hashcode and getting as json#582
jasmith-hs merged 1 commit into
masterfrom
jasmith-patch

Conversation

@jasmith-hs

Copy link
Copy Markdown
Contributor

For #532

Flip the order in which hashCode() and converting to json string are called. I found a class where calling a getter method for the first time changes the state of the object so the hashCode() result is changed. This would break the logic because the hash code is immediately different.

This is an unlikely scenario, but since it's possible (and happened), I am flipping these to make it safer. #581 should also help provide a stronger/more flexible fix that would also remedy this problem, but this will help for now.

@jasmith-hs jasmith-hs merged commit c84c943 into master Jan 14, 2021
@jasmith-hs jasmith-hs deleted the jasmith-patch branch January 14, 2021 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants