diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2014-10-14 14:09:39 +0200 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2014-10-15 13:29:07 +0200 |
commit | 6cde9e5850019be8e90b4dd1ea6c89263b1fcdae (patch) | |
tree | 848d32adff80d07d1f6567d8a14fcc0722ca8934 /sonar-batch | |
parent | 92f899b7f11ab6127f7333289a06e31f45eaa8e0 (diff) | |
download | sonarqube-6cde9e5850019be8e90b4dd1ea6c89263b1fcdae.tar.gz sonarqube-6cde9e5850019be8e90b4dd1ea6c89263b1fcdae.zip |
Fix quality flaws
Diffstat (limited to 'sonar-batch')
-rw-r--r-- | sonar-batch/src/main/java/org/sonar/batch/ProjectConfigurator.java | 3 | ||||
-rw-r--r-- | sonar-batch/src/main/java/org/sonar/batch/debt/SqaleRatingDecorator.java | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/ProjectConfigurator.java b/sonar-batch/src/main/java/org/sonar/batch/ProjectConfigurator.java index a77827817c7..0d32ff92dc9 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/ProjectConfigurator.java +++ b/sonar-batch/src/main/java/org/sonar/batch/ProjectConfigurator.java @@ -91,7 +91,8 @@ public class ProjectConfigurator implements BatchComponent { throw new IllegalArgumentException( "'sonar.projectDate' property cannot be older than the date of the last known quality snapshot on this project. Value: '" + settings.getString(CoreProperties.PROJECT_DATE_PROPERTY) + "'. " + - "Latest quality snapshot: '" + DateUtils.formatDateTime(lastSnapshot.getCreatedAt()) + "'. This property may only be used to rebuild the past in a chronological order."); + "Latest quality snapshot: '" + DateUtils.formatDateTime(lastSnapshot.getCreatedAt()) + + "'. This property may only be used to rebuild the past in a chronological order."); } } } diff --git a/sonar-batch/src/main/java/org/sonar/batch/debt/SqaleRatingDecorator.java b/sonar-batch/src/main/java/org/sonar/batch/debt/SqaleRatingDecorator.java index 46dc7bbea3d..2d18f1f54c0 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/debt/SqaleRatingDecorator.java +++ b/sonar-batch/src/main/java/org/sonar/batch/debt/SqaleRatingDecorator.java @@ -141,10 +141,10 @@ public final class SqaleRatingDecorator implements Decorator { } protected double computeDensity(double debt, double developmentCost) { - if (Double.doubleToRawLongBits(developmentCost) != 0L) { + if (developmentCost != 0d) { return debt / developmentCost; } - return 0f; + return 0d; } } |