Tal Nisan has posted comments on this change.

Change subject: findbugs: Fix fingbugs error in StorageModel class
......................................................................


Patch Set 1: (1 inline comment)

....................................................
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/storage/StorageModel.java
Line 537:             {
Line 538:                 StringBuilder queryLineBuilder = new StringBuilder();
Line 539:                 for (int i = 0; i < localDCList.size(); i++)
Line 540:                 {
Line 541:                     if (i > 0) {
Cause the idea of writing the same line two times with a mere change of a 
couple of characters just kills me, I don't see it as correct programming, I 
guess some will agree with me, I guess some will not, a matter of style I 
guess, in any case a comparison of a primitive value to a static number is way 
way more efficient than concating Strings in a loop
Line 542:                         queryLineBuilder.append(" or "); //$NON-NLS-1$
Line 543:                     }
Line 544:                     queryLineBuilder.append("datacenter="); 
//$NON-NLS-1$
Line 545:                     
queryLineBuilder.append(localDCList.get(i).getname());


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Id9281939079fa40e03170d3a2b0a43b348128a02
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Tal Nisan <[email protected]>
Gerrit-Reviewer: Alissa Bonas <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Gilad Chaplik <[email protected]>
Gerrit-Reviewer: Liron Ar <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Sergey Gotliv <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
Gerrit-Reviewer: Vered Volansky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to