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

Add @Nullable to the parameter of equals(Object) #2093

Merged
merged 1 commit into from
Sep 20, 2019

Conversation

trustin
Copy link
Member

@trustin trustin commented Sep 20, 2019

Motivation:

Object.equals(Object) accepts null, but many of our equals()
implementations do not have @Nullable annotation on their parameters.

Modifications:

  • Add @Nullable to the parameter of equals(Object)

Result:

  • Better null-related inference

@trustin trustin added this to the 0.92.0 milestone Sep 20, 2019
Copy link
Contributor

@ikhoon ikhoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

Copy link
Member

@minwoox minwoox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Motivation:

`Object.equals(Object)` accepts `null`, but many of our `equals()`
implementations do not have `@Nullable` annotation on their parameters.

Modifications:

- Add `@Nullable` to the parameter of `equals(Object)`

Result:

- Better `null`-related inference
@trustin trustin merged commit f0d870f into line:master Sep 20, 2019
@trustin trustin deleted the equals_nullability branch September 20, 2019 07:09
eugene70 pushed a commit to eugene70/armeria that referenced this pull request Oct 16, 2019
Motivation:

`Object.equals(Object)` accepts `null`, but many of our `equals()`
implementations do not have `@Nullable` annotation on their parameters.

Modifications:

- Add `@Nullable` to the parameter of `equals(Object)`

Result:

- Better `null`-related inference
fmguerreiro pushed a commit to fmguerreiro/armeria that referenced this pull request Sep 19, 2020
Motivation:

`Object.equals(Object)` accepts `null`, but many of our `equals()`
implementations do not have `@Nullable` annotation on their parameters.

Modifications:

- Add `@Nullable` to the parameter of `equals(Object)`

Result:

- Better `null`-related inference
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants