Moti Asayag has posted comments on this change.
Change subject: webadmin: Cannot add network to VM when dc have bridgeless
mgmnt network
......................................................................
Patch Set 1: (1 inline comment)
....................................................
File
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/NewVmInterfaceModel.java
Line 76: protected void initSelectedNetwork() {
Line 77: List<Network> networks = (List<Network>)
getNetwork().getItems();
Line 78: networks = networks == null ? new ArrayList<Network>() :
networks;
Line 79: for (Network network : networks) {
Line 80: if (ENGINE_NETWORK_NAME != null && network != null &&
ENGINE_NETWORK_NAME.equals(network.getName())) {
I guess you mean if Network Linking is supported.
Adding intentional null element into a collection seems lesser idea than having
a network element with empty name on which you can iterate without risk.
Wouldn't it be safer and more clear to address a network with empty name as the
empty network rather to a null element ?
I'm aware that this is a bit off of this patch context but that what caused the
original problem.
Line 81: getNetwork().setSelectedItem(network);
Line 82: return;
Line 83: }
Line 84: }
--
To view, visit http://gerrit.ovirt.org/12139
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I9f844fde815c00dff441192d9e977e4c23615ce3
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alona Kaplan <[email protected]>
Gerrit-Reviewer: Alona Kaplan <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches