Skip to content

Commit

Permalink
[#74] Use .equals() when comparing objects
Browse files Browse the repository at this point in the history
There is a `long` and a `Long` member in this class. The method is
comparing the object not the primitive
  • Loading branch information
iperdomo committed Apr 18, 2024
1 parent d682994 commit 0bfceee
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public int hashCode() {

/** {@inheritDoc} */
public boolean equals(Object o) {
return o instanceof InstanceIdentifier && __id == ((InstanceIdentifier) o).__id;
return o instanceof InstanceIdentifier && __id.equals(((InstanceIdentifier) o).__id);
}

/**
Expand Down

0 comments on commit 0bfceee

Please sign in to comment.