Repository navigation
Merge CollectionUndefinedEquality and ArrayAsKeyOfSetOrMap into UndefinedEquals. - #6205
Merged
Merged
Conversation
…inedEquals. `UndefinedEquals`, `CollectionUndefinedEquality`, and `ArrayAsKeyOfSetOrMap` all report code that relies on `equals` or `hashCode` of types where those methods aren't meaningful, but each covered a different subset of use sites: direct equality, collection containment, and hash-based container creation. Add `AbstractEqualsHashCodeUsageChecker`, which finds the places where code relies on `equals` and `hashCode`, either explicitly or implicitly through collections, and lets each check decide which types are a problem for each kind of use. Rebuild `UndefinedEquals` on top of it, absorbing the other two checks and keeping their names as `altNames` so existing suppressions and `-Xep` flags keep working. PiperOrigin-RevId: 998967393
copybara-service
Bot
force-pushed
the
test_997801100
branch
from
October 13, 2026 23:34
aea4df5 to
b8a8390
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merge CollectionUndefinedEquality and ArrayAsKeyOfSetOrMap into UndefinedEquals.
UndefinedEquals,CollectionUndefinedEquality, andArrayAsKeyOfSetOrMapall report code that relies onequalsorhashCodeof types where those methods aren't meaningful, but each covered a different subset of use sites: direct equality, collection containment, and hash-based container creation.Add
AbstractEqualsHashCodeUsageChecker, which finds the places where code relies onequalsandhashCode, either explicitly or implicitly through collections, and lets each check decide which types are a problem for each kind of use. RebuildUndefinedEqualson top of it, absorbing the other two checks and keeping their names asaltNamesso existing suppressions and-Xepflags keep working.