Shahar Havivi has uploaded a new change for review.

Change subject: findbugs: fix for inaccurate floating point comparison
......................................................................

findbugs: fix for inaccurate floating point comparison

in commit 50680f0eb434080ad147dd2b479ced02375e50dc added a fix
for floating point equality with a bug, comparing Double to long.

This commit fix it to compare Double to Double.

Change-Id: Icf3081c6d7d495dbfbd47a2092fe0e9a67be4299
Signed-off-by: Shahar Havivi <[email protected]>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/quota/QuotaManager.java
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/74/15474/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/quota/QuotaManager.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/quota/QuotaManager.java
index b77efc9..24b278e 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/quota/QuotaManager.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/quota/QuotaManager.java
@@ -985,7 +985,7 @@
                     if 
(QuotaStorage.UNLIMITED.equals(quotaStorage.getStorageSizeGB())) {
                         storageLimit = QuotaStorage.UNLIMITED; // Do not break 
because usage is still counting
                     }
-                    if 
(!Double.valueOf(storageLimit).equals(QuotaStorage.UNLIMITED)) {
+                    if 
(!Double.valueOf(storageLimit).equals(Double.valueOf(QuotaStorage.UNLIMITED.doubleValue())))
 {
                         storageLimit += quotaStorage.getStorageSizeGB();
                     }
                     storageUsage += quotaStorage.getStorageSizeGBUsage();


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

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

Reply via email to