Allon Mureinik has posted comments on this change.

Change subject: core:Use proper percentage calculation for storage.
......................................................................


Patch Set 1: (1 inline comment)

....................................................
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/StorageDomainDynamic.java
Line 64:         this.usedDiskSize = value;
Line 65:     }
Line 66: 
Line 67:     public double getfreeDiskPercent() {
Line 68:         Integer usedDiskSize = getused_disk_size() == null ? 0 : 
getused_disk_size();
You already did the logic of handling null so it can be outboxed, why keep the 
useless integer? You're outboxing it anyway in another couple of lines.
Line 69:         Integer availableDiskSize = getavailable_disk_size() == null ? 
0 : getavailable_disk_size();
Line 70:         double totalSize = usedDiskSize + availableDiskSize;
Line 71:         return totalSize != 0 ? (availableDiskSize / totalSize) * 
(double) 100 : 0;
Line 72:     }


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic9c03538a4c6173bd8eb5c0f35f665659afcff2d
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to