Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rockoder committed Mar 9, 2019
1 parent 02fd91a commit 2133494
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions gson/src/main/java/org/baeldung/gson/entities/MyClass.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ public void setName(String name) {
this.name = name;
}

@Override public boolean equals(Object o) {
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
Expand All @@ -40,7 +41,8 @@ public void setName(String name) {
return id == myClass.id && Objects.equals(name, myClass.name);
}

@Override public int hashCode() {
@Override
public int hashCode() {

return Objects.hash(id, name);
}
Expand Down

0 comments on commit 2133494

Please sign in to comment.