Committed by
Gerrit Code Review
Equals and hashcode issue fix
Change-Id: I1bd70d94c1450b029771420ebcd43db6d14be88a
Showing
2 changed files
with
6 additions
and
6 deletions
... | @@ -15,7 +15,7 @@ | ... | @@ -15,7 +15,7 @@ |
15 | */ | 15 | */ |
16 | package org.onosproject.pcepio.types; | 16 | package org.onosproject.pcepio.types; |
17 | 17 | ||
18 | -import java.util.Objects; | 18 | +import java.util.Arrays; |
19 | 19 | ||
20 | import org.jboss.netty.buffer.ChannelBuffer; | 20 | import org.jboss.netty.buffer.ChannelBuffer; |
21 | import org.onosproject.pcepio.protocol.PcepVersion; | 21 | import org.onosproject.pcepio.protocol.PcepVersion; |
... | @@ -125,7 +125,7 @@ public class IPv6TERouterIdofLocalNodeTlv implements PcepValueType { | ... | @@ -125,7 +125,7 @@ public class IPv6TERouterIdofLocalNodeTlv implements PcepValueType { |
125 | 125 | ||
126 | @Override | 126 | @Override |
127 | public int hashCode() { | 127 | public int hashCode() { |
128 | - return Objects.hash(rawValue); | 128 | + return Arrays.hashCode(rawValue); |
129 | } | 129 | } |
130 | 130 | ||
131 | @Override | 131 | @Override |
... | @@ -135,7 +135,7 @@ public class IPv6TERouterIdofLocalNodeTlv implements PcepValueType { | ... | @@ -135,7 +135,7 @@ public class IPv6TERouterIdofLocalNodeTlv implements PcepValueType { |
135 | } | 135 | } |
136 | if (obj instanceof IPv6TERouterIdofLocalNodeTlv) { | 136 | if (obj instanceof IPv6TERouterIdofLocalNodeTlv) { |
137 | IPv6TERouterIdofLocalNodeTlv other = (IPv6TERouterIdofLocalNodeTlv) obj; | 137 | IPv6TERouterIdofLocalNodeTlv other = (IPv6TERouterIdofLocalNodeTlv) obj; |
138 | - return Objects.equals(rawValue, other.rawValue); | 138 | + return Arrays.equals(rawValue, other.rawValue); |
139 | } | 139 | } |
140 | return false; | 140 | return false; |
141 | } | 141 | } | ... | ... |
... | @@ -15,7 +15,7 @@ | ... | @@ -15,7 +15,7 @@ |
15 | */ | 15 | */ |
16 | package org.onosproject.pcepio.types; | 16 | package org.onosproject.pcepio.types; |
17 | 17 | ||
18 | -import java.util.Objects; | 18 | +import java.util.Arrays; |
19 | 19 | ||
20 | import org.jboss.netty.buffer.ChannelBuffer; | 20 | import org.jboss.netty.buffer.ChannelBuffer; |
21 | import org.onosproject.pcepio.protocol.PcepVersion; | 21 | import org.onosproject.pcepio.protocol.PcepVersion; |
... | @@ -117,7 +117,7 @@ public class IPv6TERouterIdofRemoteNodeTlv implements PcepValueType { | ... | @@ -117,7 +117,7 @@ public class IPv6TERouterIdofRemoteNodeTlv implements PcepValueType { |
117 | 117 | ||
118 | @Override | 118 | @Override |
119 | public int hashCode() { | 119 | public int hashCode() { |
120 | - return Objects.hash(rawValue); | 120 | + return Arrays.hashCode(rawValue); |
121 | } | 121 | } |
122 | 122 | ||
123 | @Override | 123 | @Override |
... | @@ -127,7 +127,7 @@ public class IPv6TERouterIdofRemoteNodeTlv implements PcepValueType { | ... | @@ -127,7 +127,7 @@ public class IPv6TERouterIdofRemoteNodeTlv implements PcepValueType { |
127 | } | 127 | } |
128 | if (obj instanceof IPv6TERouterIdofRemoteNodeTlv) { | 128 | if (obj instanceof IPv6TERouterIdofRemoteNodeTlv) { |
129 | IPv6TERouterIdofRemoteNodeTlv other = (IPv6TERouterIdofRemoteNodeTlv) obj; | 129 | IPv6TERouterIdofRemoteNodeTlv other = (IPv6TERouterIdofRemoteNodeTlv) obj; |
130 | - return Objects.equals(rawValue, other.rawValue); | 130 | + return Arrays.equals(rawValue, other.rawValue); |
131 | } | 131 | } |
132 | return false; | 132 | return false; |
133 | } | 133 | } | ... | ... |
-
Please register or login to post a comment