Equals and hashcode issue fix
Change-Id: I1bd70d94c1450b029771420ebcd43db6d14be88a
diff --git a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IPv6TERouterIdofLocalNodeTlv.java b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IPv6TERouterIdofLocalNodeTlv.java
index bc8eca6..f10d5e3 100644
--- a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IPv6TERouterIdofLocalNodeTlv.java
+++ b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IPv6TERouterIdofLocalNodeTlv.java
@@ -15,7 +15,7 @@
*/
package org.onosproject.pcepio.types;
-import java.util.Objects;
+import java.util.Arrays;
import org.jboss.netty.buffer.ChannelBuffer;
import org.onosproject.pcepio.protocol.PcepVersion;
@@ -125,7 +125,7 @@
@Override
public int hashCode() {
- return Objects.hash(rawValue);
+ return Arrays.hashCode(rawValue);
}
@Override
@@ -135,7 +135,7 @@
}
if (obj instanceof IPv6TERouterIdofLocalNodeTlv) {
IPv6TERouterIdofLocalNodeTlv other = (IPv6TERouterIdofLocalNodeTlv) obj;
- return Objects.equals(rawValue, other.rawValue);
+ return Arrays.equals(rawValue, other.rawValue);
}
return false;
}
diff --git a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IPv6TERouterIdofRemoteNodeTlv.java b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IPv6TERouterIdofRemoteNodeTlv.java
index 1fc7124..bf1d475 100644
--- a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IPv6TERouterIdofRemoteNodeTlv.java
+++ b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IPv6TERouterIdofRemoteNodeTlv.java
@@ -15,7 +15,7 @@
*/
package org.onosproject.pcepio.types;
-import java.util.Objects;
+import java.util.Arrays;
import org.jboss.netty.buffer.ChannelBuffer;
import org.onosproject.pcepio.protocol.PcepVersion;
@@ -117,7 +117,7 @@
@Override
public int hashCode() {
- return Objects.hash(rawValue);
+ return Arrays.hashCode(rawValue);
}
@Override
@@ -127,7 +127,7 @@
}
if (obj instanceof IPv6TERouterIdofRemoteNodeTlv) {
IPv6TERouterIdofRemoteNodeTlv other = (IPv6TERouterIdofRemoteNodeTlv) obj;
- return Objects.equals(rawValue, other.rawValue);
+ return Arrays.equals(rawValue, other.rawValue);
}
return false;
}