Mike Kolesnik has posted comments on this change.

Change subject: core: Refactor SetupNetworksVdsCommand
......................................................................


Patch Set 1: (1 inline comment)

....................................................
File 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/SetupNetworksVDSCommand.java
Line 31:     }
Line 32: 
Line 33:     private XmlRpcStruct generateNetworks() {
Line 34:         XmlRpcStruct networks = new XmlRpcStruct();
Line 35:         String ifaceNameWithoutVlan;
I wouldn't try to out-smart the compiler/JRE optimizations..

There is no assurance that this method will save you any performance, and it 
only hinders the optimizations that the compiler and/or JRE could make to this 
code.

Instead what you do is create problematic code to read & maintain since you 
declare variables out of scope, and open up for potential bugs.
Line 36:         Boolean bonded;
Line 37:         Map<String, String> opts;
Line 38:         VdsNetworkInterface iface;
Line 39:         for (Network network : getParameters().getNetworks()) {


--
To view, visit http://gerrit.ovirt.org/12059
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic12d9c601dad77f77808bbec46271ea675509530
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Muli Salem <[email protected]>
Gerrit-Reviewer: Mike Kolesnik <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to