Treat parameter of `Object.equals()` as `@Nullable`
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 4.1k
- Forks
- 370
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 68
Description
This would be a bit disruptive to users due to newly-reported errors, but it's a correct modeling of the API and could expose bugs. See https://github.com/uber/NullAway/issues/619#issuecomment-1178403833 for discussion, including recommending EqualsMissingNullable as an autofix (though it won't fix the problems if methods were dereferencing the parameter without a null check).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked NullAway discussion and the EqualsMissingNullable documentation. Then locate the Java handling and tests for Object.equals(); done means its parameter is modeled as nullable and the resulting errors, including unsafe dereferences that the autofix cannot resolve, are covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100