commit | ca9cc8e28eba18da77f4fa021fb7c3a3f76e5d44 | [log] [tgz] |
---|---|---|
author | HIGUCHI Yuta <y-higuchi@ak.jp.nec.com> | Thu Oct 29 23:26:51 2015 -0700 |
committer | Gerrit Code Review <gerrit@onlab.us> | Thu Nov 05 21:47:59 2015 +0000 |
tree | 73d753cb0d4089c05b3a7634d893514d2fb7094e | |
parent | 3559c316f236441808a7d31de483d36956361801 [diff] [blame] |
Avoid use of Objects.hash when there's only 1 params - directly call #hashCode() when hashed Object seems non-null - replace with Objects.hashCode(Object) when Nullable - replace with Long.hashCode(long), etc. when primitive Change-Id: I08c24ebbe94cf4162d1491209a14baf953163e41
diff --git a/core/api/src/main/java/org/onosproject/net/DeviceId.java b/core/api/src/main/java/org/onosproject/net/DeviceId.java index 5331342..e2c1214 100644 --- a/core/api/src/main/java/org/onosproject/net/DeviceId.java +++ b/core/api/src/main/java/org/onosproject/net/DeviceId.java
@@ -75,7 +75,7 @@ @Override public int hashCode() { - return Objects.hash(str); + return str.hashCode(); } @Override