diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2014-11-21 11:02:55 +0100 |
---|---|---|
committer | Julien HENRY <julien.henry@sonarsource.com> | 2014-11-21 11:02:55 +0100 |
commit | 50050c7ea204110ee4ac3bf59e8f42f510622f12 (patch) | |
tree | 58aa3ca674545cdfec4aa91f8481edbaafac6efd /sonar-plugin-api | |
parent | dd04e9f9518e0b84009d21ec5a99bd1f00d796f7 (diff) | |
download | sonarqube-50050c7ea204110ee4ac3bf59e8f42f510622f12.tar.gz sonarqube-50050c7ea204110ee4ac3bf59e8f42f510622f12.zip |
Fix some quality flaws
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/utils/Duration.java | 2 | ||||
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/utils/internal/WorkDuration.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/Duration.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/Duration.java index e340f805124..d542a667eda 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/Duration.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/Duration.java @@ -48,7 +48,7 @@ public class Duration implements Serializable { } private Duration(int days, int hours, int minutes, int hoursInDay) { - this(((long) days * hoursInDay * MINUTES_IN_ONE_HOUR) + (hours * MINUTES_IN_ONE_HOUR) + minutes); + this((days * hoursInDay * MINUTES_IN_ONE_HOUR) + (hours * MINUTES_IN_ONE_HOUR) + minutes); } /** diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/internal/WorkDuration.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/internal/WorkDuration.java index 7bbfe582122..7dd8167daf5 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/internal/WorkDuration.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/internal/WorkDuration.java @@ -100,7 +100,7 @@ public class WorkDuration implements Serializable { } static WorkDuration createFromMinutes(long duration, int hoursInDay) { - int days = ((Double) ((double) duration / hoursInDay / 60d)).intValue(); + int days = ((Double) (duration / hoursInDay / 60d)).intValue(); Long currentDurationInMinutes = duration - (60L * days * hoursInDay); int hours = ((Double) (currentDurationInMinutes / 60d)).intValue(); currentDurationInMinutes = currentDurationInMinutes - (60L * hours); |