From e827c8d4c09eff32b002dd0465042532bfb03bf6 Mon Sep 17 00:00:00 2001 From: Brian Harrington Date: Sun, 21 Sep 2014 00:16:59 -0700 Subject: [PATCH] Make the hashCode cheaper. --- servo-core/src/main/java/com/netflix/servo/tag/BasicTag.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/servo-core/src/main/java/com/netflix/servo/tag/BasicTag.java b/servo-core/src/main/java/com/netflix/servo/tag/BasicTag.java index 4d732904..175bbb20 100644 --- a/servo-core/src/main/java/com/netflix/servo/tag/BasicTag.java +++ b/servo-core/src/main/java/com/netflix/servo/tag/BasicTag.java @@ -15,7 +15,6 @@ */ package com.netflix.servo.tag; -import com.google.common.base.Objects; import com.google.common.base.Preconditions; /** @@ -67,7 +66,9 @@ public boolean equals(Object o) { /** {@inheritDoc} */ @Override public int hashCode() { - return Objects.hashCode(key, value); + int result = key.hashCode(); + result = 31 * result + value.hashCode(); + return result; } /** {@inheritDoc} */