commit | 6935951b0f4c95ced60c049a6840cb5b89acc247 | [log] [tgz] |
---|---|---|
author | Saritha <saritha.rt@samsung.com> | Tue May 09 15:01:48 2017 +0530 |
committer | Satishk-Huawei <satishk@huawei.com> | Wed May 10 03:28:47 2017 +0000 |
tree | b8d8e50127eb562a3bbf15f143b975e6d0b94b9d | |
parent | 4689f81cd05106f592530aed2dc81fc751c3da35 [diff] |
invalid equals(), comparing different object types Change-Id: I2a75955fec042c2ed2a8848628c8b20d039e26c4
diff --git a/protocols/ospf/ctl/src/main/java/org/onosproject/ospf/controller/area/OspfAreaImpl.java b/protocols/ospf/ctl/src/main/java/org/onosproject/ospf/controller/area/OspfAreaImpl.java index 0738787..540f082 100644 --- a/protocols/ospf/ctl/src/main/java/org/onosproject/ospf/controller/area/OspfAreaImpl.java +++ b/protocols/ospf/ctl/src/main/java/org/onosproject/ospf/controller/area/OspfAreaImpl.java
@@ -668,7 +668,7 @@ } } } - if (recLsa.advertisingRouter().equals((String) neighborIP)) { + if (recLsa.advertisingRouter().toString().equals((String) neighborIP)) { continue; } if ((recLsa.lsType() == OspfParameters.LINK_LOCAL_OPAQUE_LSA ||
diff --git a/protocols/ospf/ctl/src/main/java/org/onosproject/ospf/controller/impl/TopologyForDeviceAndLinkImpl.java b/protocols/ospf/ctl/src/main/java/org/onosproject/ospf/controller/impl/TopologyForDeviceAndLinkImpl.java index 67edc39..ca890ac 100644 --- a/protocols/ospf/ctl/src/main/java/org/onosproject/ospf/controller/impl/TopologyForDeviceAndLinkImpl.java +++ b/protocols/ospf/ctl/src/main/java/org/onosproject/ospf/controller/impl/TopologyForDeviceAndLinkImpl.java
@@ -411,7 +411,7 @@ while (iterator.hasNext()) { Ip4Address secondValue = (Ip4Address) iterator.next(); - if (!value.equals("0.0.0.0")) { + if (!value.toString().equals("0.0.0.0")) { if ((!value.equals(secondValue))) { if ((!secondValue.equals(ospfArea.routerId()))) { String key = "link:" + value.toString() + "-" + secondValue.toString();