uber / uber/NullAway

Treat parameter of `Object.equals()` as `@Nullable`

Open
#672 1 comment 2 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.