Committed by
Gerrit Code Review
Ospf opaque LSA bug fix.
Change-Id: I9b2674195a754a0774013f9adf717764ea18c9a6
Showing
3 changed files
with
11 additions
and
8 deletions
| ... | @@ -29,6 +29,7 @@ import org.onosproject.ospf.protocol.lsa.tlvtypes.OpaqueTopLevelTlvTypes; | ... | @@ -29,6 +29,7 @@ import org.onosproject.ospf.protocol.lsa.tlvtypes.OpaqueTopLevelTlvTypes; |
| 29 | import org.onosproject.ospf.protocol.lsa.tlvtypes.RouterTlv; | 29 | import org.onosproject.ospf.protocol.lsa.tlvtypes.RouterTlv; |
| 30 | import org.onosproject.ospf.protocol.util.OspfParameters; | 30 | import org.onosproject.ospf.protocol.util.OspfParameters; |
| 31 | 31 | ||
| 32 | +import java.util.Arrays; | ||
| 32 | import java.util.ArrayList; | 33 | import java.util.ArrayList; |
| 33 | import java.util.List; | 34 | import java.util.List; |
| 34 | 35 | ||
| ... | @@ -192,11 +193,11 @@ public class OpaqueLsa10 extends OpaqueLsaHeader { | ... | @@ -192,11 +193,11 @@ public class OpaqueLsa10 extends OpaqueLsaHeader { |
| 192 | } | 193 | } |
| 193 | OpaqueLsa10 that = (OpaqueLsa10) o; | 194 | OpaqueLsa10 that = (OpaqueLsa10) o; |
| 194 | return Objects.equal(topLevelValues, that.topLevelValues) && | 195 | return Objects.equal(topLevelValues, that.topLevelValues) && |
| 195 | - Objects.equal(opaqueInfo, that.opaqueInfo); | 196 | + Arrays.equals(opaqueInfo, that.opaqueInfo); |
| 196 | } | 197 | } |
| 197 | 198 | ||
| 198 | @Override | 199 | @Override |
| 199 | public int hashCode() { | 200 | public int hashCode() { |
| 200 | - return Objects.hashCode(opaqueInfo, topLevelValues); | 201 | + return Objects.hashCode(Arrays.hashCode(opaqueInfo), topLevelValues); |
| 201 | } | 202 | } |
| 202 | } | 203 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -16,12 +16,13 @@ | ... | @@ -16,12 +16,13 @@ |
| 16 | package org.onosproject.ospf.protocol.lsa.types; | 16 | package org.onosproject.ospf.protocol.lsa.types; |
| 17 | 17 | ||
| 18 | import com.google.common.base.MoreObjects; | 18 | import com.google.common.base.MoreObjects; |
| 19 | -import com.google.common.base.Objects; | ||
| 20 | import com.google.common.primitives.Bytes; | 19 | import com.google.common.primitives.Bytes; |
| 21 | import org.jboss.netty.buffer.ChannelBuffer; | 20 | import org.jboss.netty.buffer.ChannelBuffer; |
| 22 | import org.onosproject.ospf.controller.OspfLsaType; | 21 | import org.onosproject.ospf.controller.OspfLsaType; |
| 23 | import org.onosproject.ospf.protocol.lsa.OpaqueLsaHeader; | 22 | import org.onosproject.ospf.protocol.lsa.OpaqueLsaHeader; |
| 24 | 23 | ||
| 24 | +import java.util.Arrays; | ||
| 25 | + | ||
| 25 | /** | 26 | /** |
| 26 | * Representation of an Opaque LSA of type AS (11). | 27 | * Representation of an Opaque LSA of type AS (11). |
| 27 | */ | 28 | */ |
| ... | @@ -106,12 +107,12 @@ public class OpaqueLsa11 extends OpaqueLsaHeader { | ... | @@ -106,12 +107,12 @@ public class OpaqueLsa11 extends OpaqueLsaHeader { |
| 106 | return false; | 107 | return false; |
| 107 | } | 108 | } |
| 108 | OpaqueLsa11 that = (OpaqueLsa11) o; | 109 | OpaqueLsa11 that = (OpaqueLsa11) o; |
| 109 | - return Objects.equal(opaqueInfo, that.opaqueInfo); | 110 | + return Arrays.equals(opaqueInfo, that.opaqueInfo); |
| 110 | } | 111 | } |
| 111 | 112 | ||
| 112 | @Override | 113 | @Override |
| 113 | public int hashCode() { | 114 | public int hashCode() { |
| 114 | - return Objects.hashCode(opaqueInfo); | 115 | + return Arrays.hashCode(opaqueInfo); |
| 115 | } | 116 | } |
| 116 | 117 | ||
| 117 | @Override | 118 | @Override | ... | ... |
| ... | @@ -16,12 +16,13 @@ | ... | @@ -16,12 +16,13 @@ |
| 16 | package org.onosproject.ospf.protocol.lsa.types; | 16 | package org.onosproject.ospf.protocol.lsa.types; |
| 17 | 17 | ||
| 18 | import com.google.common.base.MoreObjects; | 18 | import com.google.common.base.MoreObjects; |
| 19 | -import com.google.common.base.Objects; | ||
| 20 | import com.google.common.primitives.Bytes; | 19 | import com.google.common.primitives.Bytes; |
| 21 | import org.jboss.netty.buffer.ChannelBuffer; | 20 | import org.jboss.netty.buffer.ChannelBuffer; |
| 22 | import org.onosproject.ospf.controller.OspfLsaType; | 21 | import org.onosproject.ospf.controller.OspfLsaType; |
| 23 | import org.onosproject.ospf.protocol.lsa.OpaqueLsaHeader; | 22 | import org.onosproject.ospf.protocol.lsa.OpaqueLsaHeader; |
| 24 | 23 | ||
| 24 | +import java.util.Arrays; | ||
| 25 | + | ||
| 25 | /** | 26 | /** |
| 26 | * Representation of an Opaque LSA of type link local (9). | 27 | * Representation of an Opaque LSA of type link local (9). |
| 27 | */ | 28 | */ |
| ... | @@ -108,12 +109,12 @@ public class OpaqueLsa9 extends OpaqueLsaHeader { | ... | @@ -108,12 +109,12 @@ public class OpaqueLsa9 extends OpaqueLsaHeader { |
| 108 | return false; | 109 | return false; |
| 109 | } | 110 | } |
| 110 | OpaqueLsa9 that = (OpaqueLsa9) o; | 111 | OpaqueLsa9 that = (OpaqueLsa9) o; |
| 111 | - return Objects.equal(opaqueInfo, that.opaqueInfo); | 112 | + return Arrays.equals(opaqueInfo, that.opaqueInfo); |
| 112 | } | 113 | } |
| 113 | 114 | ||
| 114 | @Override | 115 | @Override |
| 115 | public int hashCode() { | 116 | public int hashCode() { |
| 116 | - return Objects.hashCode(opaqueInfo); | 117 | + return Arrays.hashCode(opaqueInfo); |
| 117 | } | 118 | } |
| 118 | 119 | ||
| 119 | @Override | 120 | @Override | ... | ... |
-
Please register or login to post a comment