Moti Asayag has posted comments on this change. Change subject: core: need to consider Vlan when getting name from nic. ......................................................................
Patch Set 1: (1 comment) http://gerrit.ovirt.org/#/c/32524/1/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/host/SetupNetworksHelper.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/host/SetupNetworksHelper.java: Line 132: Entities.hostInterfacesByNetworkName(getExistingIfaces().values()); Line 133: Line 134: for (String network : removedNetworks) { Line 135: VdsNetworkInterface nic = hostInterfacesByNetworkName.get(network); Line 136: final String baseInterfaceName = NetworkUtils.stripVlan(nic); > what if the nic is null ? according to extractRemovedNetworks() nic cannot be null since the removed networks are extracted based on existing nics. Therefore pleae remove the "nic != null" from the next condition, else the prior line 136 will probably fail with NPE and such assumptions (of null checking) makes coverity/findbugs complaining about. Line 137: Line 138: if (nic != null && !removedBonds.containsKey(baseInterfaceName)) { Line 139: if (NetworkUtils.isVlan(nic)) { Line 140: nic = nicsByName.get(baseInterfaceName); -- To view, visit http://gerrit.ovirt.org/32524 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie504a99aa31c279fc9b3304ca6a860c5d0cf7943 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Martin Mucha <[email protected]> Gerrit-Reviewer: Lior Vernia <[email protected]> Gerrit-Reviewer: Martin Mucha <[email protected]> Gerrit-Reviewer: Moti Asayag <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
