Bug 6796 - Fixes Priority bugs in integration-test 56/46156/4
authorpramod <pramod.raghavendra.jayathirth@intel.com>
Sat, 24 Sep 2016 08:39:23 +0000 (01:39 -0700)
committerPramod Raghavendra Jayathirth <pramod.raghavendra.jayathirth@intel.com>
Thu, 6 Oct 2016 18:57:24 +0000 (18:57 +0000)
1.NeutronL2gatewayConnectionNorthbound.java:118,
EC_UNRELATED_TYPES, Priority: High

This method calls equals(Object) on two references of different class
types and analysis suggests they will be to objects of different
classes at runtime

2.NeutronL2gatewayNorthbound.java:116, EC_UNRELATED_CLASS_AND_INTERFACE
This method calls equals(Object) on two references, one of which is a
class and the other an interface,where neither the class nor any of
its non-abstract subclasses implement the interface.

3.NeutronRoutersNorthbound.java:102, EC_UNRELATED_TYPES - Same as 1st
Bug

Change-Id: I23cda778f807ba02179c7d9d4e682b9561a378d4
Signed-off-by: pramod <pramod.raghavendra.jayathirth@intel.com>
northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronL2gatewayConnectionNorthbound.java
northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronL2gatewayNorthbound.java
northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronRoutersNorthbound.java

index 1e07e112dc4fb90330043b6a008976a168de6bce..4d71b5f44d0bc4cbba83c25a23d50a386ca25371 100644 (file)
@@ -115,7 +115,7 @@ public final class NeutronL2gatewayConnectionNorthbound extends AbstractNeutronN
                     && (queryConnectionID == null || queryConnectionID.equals(oSS.getID()))
                     && (queryL2gatewayID == null || queryL2gatewayID.equals(oSS.getL2gatewayID()))
                     && (queryNetworkID == null || queryNetworkID.equals(oSS.getNetworkID()))
-                    && (querySegmentID == null || querySegmentID.equals(oSS.getSegmentID()))
+                    && (querySegmentID == null || (Integer.valueOf(querySegmentID).equals(oSS.getSegmentID())))
                     && (queryPortID == null || queryPortID.equals(oSS.getPortID()))) {
                 if (fields.size() > 0) {
                     ans.add(oSS.extractFields(fields));
index 8655c236a652c915ec3af97a8df6609e3cc8873e..3a766cc6fc83d87979896e27461d6d69ee2534c7 100644 (file)
@@ -111,9 +111,7 @@ public final class NeutronL2gatewayNorthbound
             NeutronL2gateway l2gateway = i.next();
             if ((queryID == null || queryID.equals(l2gateway.getID()))
                     && (queryName == null || queryName.equals(l2gateway.getName()))
-                    && (queryTenantID == null || queryTenantID.equals(l2gateway.getTenantID()))
-                    && (queryNeutronL2gatewayDevice == null
-                            || queryNeutronL2gatewayDevice.equals(l2gateway.getNeutronL2gatewayDevices()))) {
+                    && (queryTenantID == null || queryTenantID.equals(l2gateway.getTenantID()))) {
                 if (fields.size() > 0) {
                     ans.add(l2gateway.extractFields(fields));
                 } else {
index 2eee4be8e396cde856a0617bdd02ac4fc5bd6a20..05546867cc4b8c91720487a5c562900ded58fa81 100644 (file)
@@ -98,8 +98,6 @@ public final class NeutronRoutersNorthbound
                     && (queryName == null || queryName.equals(oSS.getName()))
                     && (queryAdminStateUp == null || queryAdminStateUp.equals(oSS.getAdminStateUp()))
                     && (queryStatus == null || queryStatus.equals(oSS.getStatus()))
-                    && (queryExternalGatewayInfo == null
-                            || queryExternalGatewayInfo.equals(oSS.getExternalGatewayInfo()))
                     && (queryTenantID == null || queryTenantID.equals(oSS.getTenantID()))) {
                 if (fields.size() > 0) {
                     ans.add(oSS.extractFields(fields));