aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-squid/src
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2012-05-25 15:51:44 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2012-05-25 15:51:44 +0200
commita00b76dd1b57d56fd06797b79b6b62bd1b5fcf9d (patch)
tree3adb51e49beeacdb2d4d52b99444ac5094d8ac1f /sonar-squid/src
parentff4d30779e2b145efd7cc7ae8dee259721a7e20e (diff)
downloadsonarqube-a00b76dd1b57d56fd06797b79b6b62bd1b5fcf9d.tar.gz
sonarqube-a00b76dd1b57d56fd06797b79b6b62bd1b5fcf9d.zip
Fix some quality flaws
Diffstat (limited to 'sonar-squid/src')
-rw-r--r--sonar-squid/src/main/java/org/sonar/squid/indexer/QueryByMeasure.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/sonar-squid/src/main/java/org/sonar/squid/indexer/QueryByMeasure.java b/sonar-squid/src/main/java/org/sonar/squid/indexer/QueryByMeasure.java
index e4fd0f37347..0451d7526f9 100644
--- a/sonar-squid/src/main/java/org/sonar/squid/indexer/QueryByMeasure.java
+++ b/sonar-squid/src/main/java/org/sonar/squid/indexer/QueryByMeasure.java
@@ -20,6 +20,7 @@
package org.sonar.squid.indexer;
+import org.apache.commons.lang.math.NumberUtils;
import org.sonar.squid.api.Query;
import org.sonar.squid.api.SourceCode;
import org.sonar.squid.measures.Metric;
@@ -52,7 +53,7 @@ public class QueryByMeasure implements Query {
public boolean match(SourceCode unit) {
switch (operator) {
case EQUALS:
- return unit.getDouble(metric) == value;
+ return NumberUtils.compare(unit.getDouble(metric), value)==0;
case GREATER_THAN:
return unit.getDouble(metric) > value;
case GREATER_THAN_EQUALS: