Sho SHIMIZU
Committed by Gerrit Code Review

Replace manual hash code calculation for long with Long.hashCode(long)

Change-Id: Ie588a2904e0fcc790282af22912e8ff6d7a31648
...@@ -60,7 +60,7 @@ public final class IntentId { ...@@ -60,7 +60,7 @@ public final class IntentId {
60 60
61 @Override 61 @Override
62 public int hashCode() { 62 public int hashCode() {
63 - return (int) (value ^ (value >>> 32)); 63 + return Long.hashCode(value);
64 } 64 }
65 65
66 @Override 66 @Override
......
...@@ -42,7 +42,7 @@ public abstract class Key { ...@@ -42,7 +42,7 @@ public abstract class Key {
42 42
43 @Override 43 @Override
44 public int hashCode() { 44 public int hashCode() {
45 - return (int) (hash() ^ (hash() >>> 32)); 45 + return Long.hashCode(hash);
46 } 46 }
47 47
48 @Override 48 @Override
......
...@@ -65,7 +65,7 @@ public final class TunnelId { ...@@ -65,7 +65,7 @@ public final class TunnelId {
65 65
66 @Override 66 @Override
67 public int hashCode() { 67 public int hashCode() {
68 - return (int) (value ^ (value >>> 32)); 68 + return Long.hashCode(value);
69 } 69 }
70 70
71 @Override 71 @Override
......
...@@ -91,9 +91,7 @@ public final class Dpid { ...@@ -91,9 +91,7 @@ public final class Dpid {
91 91
92 @Override 92 @Override
93 public int hashCode() { 93 public int hashCode() {
94 - int hash = 17; 94 + return Long.hashCode(value);
95 - hash += 31 * hash + (int) (value ^ value >>> 32);
96 - return hash;
97 } 95 }
98 96
99 /** 97 /**
......
...@@ -81,8 +81,6 @@ public final class ChassisId { ...@@ -81,8 +81,6 @@ public final class ChassisId {
81 81
82 @Override 82 @Override
83 public int hashCode() { 83 public int hashCode() {
84 - int hash = 17; 84 + return Long.hashCode(value);
85 - hash += 31 * hash + (int) (value ^ value >>> 32);
86 - return hash;
87 } 85 }
88 } 86 }
......