diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2012-05-25 15:51:44 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2012-05-25 15:51:44 +0200 |
commit | a00b76dd1b57d56fd06797b79b6b62bd1b5fcf9d (patch) | |
tree | 3adb51e49beeacdb2d4d52b99444ac5094d8ac1f /sonar-squid/src | |
parent | ff4d30779e2b145efd7cc7ae8dee259721a7e20e (diff) | |
download | sonarqube-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.java | 3 |
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: |