cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gir...@apache.org
Subject [43/50] git commit: updated refs/heads/marvin to df58f51
Date Wed, 29 Jan 2014 08:54:18 GMT
findbugs: comparison of wrapper objects

Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/bd2acd1e
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/bd2acd1e
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/bd2acd1e

Branch: refs/heads/marvin
Commit: bd2acd1eff5d84630318cef0cde2c81204d07586
Parents: 547aa36
Author: Daan Hoogland <daan@onecht.net>
Authored: Tue Jan 28 23:20:45 2014 +0100
Committer: Daan Hoogland <daan.hoogland@gmail.com>
Committed: Tue Jan 28 23:20:45 2014 +0100

----------------------------------------------------------------------
 server/src/com/cloud/server/StatsCollector.java | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bd2acd1e/server/src/com/cloud/server/StatsCollector.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/server/StatsCollector.java b/server/src/com/cloud/server/StatsCollector.java
index 95ae047..601ab12 100755
--- a/server/src/com/cloud/server/StatsCollector.java
+++ b/server/src/com/cloud/server/StatsCollector.java
@@ -839,11 +839,11 @@ public class StatsCollector extends ManagerBase implements ComponentMethodInterc
                                 Double sum = avgCounter.get(counter_count);
                                 Double avg = sum / currentVM;
                                 Operator op = conditionVO.getRelationalOperator();
-                                boolean bConditionCheck = ((op == com.cloud.network.as.Condition.Operator.EQ)
&& (thresholdPercent == avg))
-                                    || ((op == com.cloud.network.as.Condition.Operator.GE)
&& (avg >= thresholdPercent))
-                                    || ((op == com.cloud.network.as.Condition.Operator.GT)
&& (avg > thresholdPercent))
-                                    || ((op == com.cloud.network.as.Condition.Operator.LE)
&& (avg <= thresholdPercent))
-                                    || ((op == com.cloud.network.as.Condition.Operator.LT)
&& (avg < thresholdPercent));
+                                boolean bConditionCheck = ((op == com.cloud.network.as.Condition.Operator.EQ)
&& (thresholdPercent.equals(avg)))
+                                    || ((op == com.cloud.network.as.Condition.Operator.GE)
&& (avg.doubleValue() >= thresholdPercent.doubleValue()))
+                                    || ((op == com.cloud.network.as.Condition.Operator.GT)
&& (avg.doubleValue() > thresholdPercent.doubleValue()))
+                                    || ((op == com.cloud.network.as.Condition.Operator.LE)
&& (avg.doubleValue() <= thresholdPercent.doubleValue()))
+                                    || ((op == com.cloud.network.as.Condition.Operator.LT)
&& (avg.doubleValue() < thresholdPercent.doubleValue()));
 
                                 if (!bConditionCheck) {
                                     bValid = false;


Mime
View raw message