Tomas Jelinek has posted comments on this change.
Change subject: webadmin,userportal: do not add default nic on edit vm
......................................................................
Patch Set 2:
(1 comment)
....................................................
File
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/UnitVmModelNetworkAsyncCallbacks.java
Line 26: if (returnValue != null && returnValue.getSucceeded()) {
Line 27: List<NicWithLogicalNetworks> nicWithLogicalNetworks =
(List<NicWithLogicalNetworks>)
unitVmModel.getNicsWithLogicalNetworks().getItems();
Line 28: if (nicWithLogicalNetworks == null) {
Line 29: // enter the opertation with null object if
nothing has been edited by the user
Line 30: nicWithLogicalNetworks = new
ArrayList<NicWithLogicalNetworks>();
I meant null object as a pattern - the object with neutral behavior.
I could also pass null but this is the top most place to do the null check and
enter the specific operation with valid argument. Otherwise I would have to do
some null checks much deeper in e.g.
VmNetworkCreatingManager.createAddVmInterfaceParams
Line 31: }
Line 32: doNetworkOperation(returnValue,
nicWithLogicalNetworks);
Line 33: } else {
Line 34: networkCreatingManager.getCallback().queryFailed();
--
To view, visit http://gerrit.ovirt.org/17315
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I21724b30dc1ad6ccbbe40448ad77c47c22123c06
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Tomas Jelinek <[email protected]>
Gerrit-Reviewer: Alona Kaplan <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Tomas Jelinek <[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