findbugs: comparison of wrapper objects

This commit is contained in:
Daan Hoogland 2014-01-28 23:20:45 +01:00 committed by Daan Hoogland
parent 547aa36707
commit bd2acd1eff
1 changed files with 5 additions and 5 deletions

View File

@ -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;