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

Minor hashCode/equals override improvements #52

Merged
merged 1 commit into from
Sep 24, 2019
Merged

Minor hashCode/equals override improvements #52

merged 1 commit into from
Sep 24, 2019

Conversation

Neutius
Copy link
Contributor

@Neutius Neutius commented Sep 3, 2019

  • Removed hashCode() override from Datum class - it does not override equals(), and should not override hashCode(). The isEqual() method could be renamed or rewritten to override equals, but is currently does not.
  • Added hashCode() override to Unit class and Pair class.
  • Added override annotations to Ellipsoid class for clarity.

Signed-off-by: neutlamberink [email protected]

…quals(), and should not override hashCode(). The isEqual() method could be renamed or rewritten to override equals, but is currently does not.

Added hashCode() override to Unit class and Pair class.
Added override annotations to Ellipsoid class for clarity.

Signed-off-by: neutlamberink <[email protected]>
Copy link
Member

@pomadchin pomadchin left a comment

Choose a reason for hiding this comment

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

Thx for cleaning the codebase!

@@ -265,9 +265,4 @@ public void shift(ProjCoordinate xy) {
public void inverseShift(ProjCoordinate xy) {
Grid.shift(grids, true, xy);
}

@Override
Copy link
Member

Choose a reason for hiding this comment

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

👍 equals is not overrided, so we don't need a hashCode function override.

@echeipesh echeipesh merged commit b51bdb5 into locationtech:master Sep 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants