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

Potential bug in KeyedObjectHash::replace #5486

Closed
malhotrashivam opened this issue May 14, 2024 · 1 comment
Closed

Potential bug in KeyedObjectHash::replace #5486

malhotrashivam opened this issue May 14, 2024 · 1 comment
Assignees
Labels
bug Something isn't working triage
Milestone

Comments

@malhotrashivam
Copy link
Contributor

@rcaudy pointed out that there might be a bug in the KeyObjectHash::replace logic in this statement.
It should instead say

if (mode != IF_ABSENT && (oldValue == null || candidate.equals(oldValue))) {

As part of this issue, investigate and fix the issue and add some tests for it. Also, resolve the TODO introduced in #5357.

Context: This issue was highlighted as part of review of #5357 because we couldn't use the replace method because of this potential issue.

@malhotrashivam
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
None yet
Development

No branches or pull requests

1 participant