Equals and Hash code fix for byte array.
Change-Id: Iafef68c2cd6c3751435f92a2014545da94567748
diff --git a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/LinkNameTlv.java b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/LinkNameTlv.java
index aa0f11a..34dea5b 100644
--- a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/LinkNameTlv.java
+++ b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/LinkNameTlv.java
@@ -15,8 +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;
import org.slf4j.Logger;
@@ -100,7 +99,7 @@
@Override
public int hashCode() {
- return Objects.hash(rawValue);
+ return Arrays.hashCode(rawValue);
}
@Override
@@ -110,7 +109,7 @@
}
if (obj instanceof LinkNameTlv) {
LinkNameTlv other = (LinkNameTlv) obj;
- return Objects.equals(rawValue, other.rawValue);
+ return Arrays.equals(this.rawValue, other.rawValue);
}
return false;
}