aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-batch
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2014-10-14 21:47:34 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2014-10-14 21:47:34 +0200
commitc809056c115524c9303c5b9c8e77964d976d4226 (patch)
tree22e770f6cf31f2d03a830eab04c6508a4c27f17a /sonar-batch
parent3f74239a8255ad897c43b0b2fd260003b083eac9 (diff)
downloadsonarqube-c809056c115524c9303c5b9c8e77964d976d4226.tar.gz
sonarqube-c809056c115524c9303c5b9c8e77964d976d4226.zip
Fix quality flaws
Diffstat (limited to 'sonar-batch')
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/design/BaseTangleIndexDecorator.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/design/BaseTangleIndexDecorator.java b/sonar-batch/src/main/java/org/sonar/batch/design/BaseTangleIndexDecorator.java
index 509cedcc7f1..069b5707236 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/design/BaseTangleIndexDecorator.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/design/BaseTangleIndexDecorator.java
@@ -82,9 +82,8 @@ public class BaseTangleIndexDecorator implements Decorator {
return context.getMeasure(tangleIndexMetric) == null;
}
-
private double compute(double tangles, double totalWeight) {
- if (totalWeight==0.0) {
+ if (Double.doubleToRawLongBits(totalWeight) == 0L) {
return 0.0;
}
double result = 2 * tangles / totalWeight;