Skip to content

Commit 1553900

Browse files
authored
Avoid boxing in Measurement.hashCode (#1208)
Use Long.hashCode / Double.hashCode to avoid boxing in Measurment.hashCode.
1 parent b48c17d commit 1553900

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

spectator-api/src/main/java/com/netflix/spectator/api/Measurement.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ public int hashCode() {
6363
final int prime = 31;
6464
int hc = prime;
6565
hc = prime * hc + id.hashCode();
66-
hc = prime * hc + Long.valueOf(timestamp).hashCode();
67-
hc = prime * hc + Double.valueOf(value).hashCode();
66+
hc = prime * hc + Long.hashCode(timestamp);
67+
hc = prime * hc + Double.hashCode(value);
6868
return hc;
6969
}
7070

0 commit comments

Comments
 (0)