Skip to content

Commit

Permalink
Fix LongWrapper comparison issue (#4940)
Browse files Browse the repository at this point in the history
  • Loading branch information
georgecwan authored Dec 13, 2023
1 parent 5fab992 commit 8614e20
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,16 @@ public String valueOf() {
public String toString() {
return String.valueOf(value);
}

@JsIgnore
@Override
public boolean equals(Object obj) {
return obj instanceof LongWrapper && ((LongWrapper) obj).value == value;
}

@JsIgnore
@Override
public int hashCode() {
return Long.hashCode(value);
}
}

0 comments on commit 8614e20

Please sign in to comment.