Skip to content

Commit

Permalink
style: enable EqualsHashCode in checkstyle (#5157)
Browse files Browse the repository at this point in the history
  • Loading branch information
CodaBlurd committed May 12, 2024
1 parent 319d514 commit 5703be5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion checkstyle.xml
Expand Up @@ -161,7 +161,7 @@
<!-- Checks for common coding problems -->
<!-- See https://checkstyle.org/checks/coding/index.html -->
<module name="EmptyStatement"/>
<!-- TODO <module name="EqualsHashCode"/> -->
<module name="EqualsHashCode"/>
<!-- TODO <module name="HiddenField"/> -->
<module name="IllegalInstantiation"/>
<!-- TODO <module name="InnerAssignment"/> -->
Expand Down
Expand Up @@ -81,6 +81,11 @@ public boolean equals(Object obj) {
return false;
}

@Override
public int hashCode() {
return Arrays.hashCode(coordinates);
}

@Override
public String toString() {
return Arrays.toString(coordinates);
Expand Down

0 comments on commit 5703be5

Please sign in to comment.