Tomer Saban has uploaded a new change for review.

Change subject: engine: Added use of max instead of use of if.
......................................................................

engine: Added use of max instead of use of if.

Change-Id: I5b714c7ef89e75a48278d92e14639e7ed22c8152
Signed-off-by: Tomer Saban <[email protected]>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/HaReservationWeightPolicyUnit.java
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/76/39076/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/HaReservationWeightPolicyUnit.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/HaReservationWeightPolicyUnit.java
index 581168a..2bca480 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/HaReservationWeightPolicyUnit.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/HaReservationWeightPolicyUnit.java
@@ -54,7 +54,7 @@
                 if (hostId2HaVmMapping.containsKey(host.getId())) {
                     count = hostId2HaVmMapping.get(host.getId()).size();
                 }
-                maxCount = (maxCount < count) ? count : maxCount;
+                maxCount = Math.max(maxCount, count);
                 hostsHaVmCount.put(host.getId(), count);
             }
 


-- 
To view, visit https://gerrit.ovirt.org/39076
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5b714c7ef89e75a48278d92e14639e7ed22c8152
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Tomer Saban <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to