diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2015-05-25 14:22:56 +0200 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2015-05-25 14:22:56 +0200 |
commit | 55e60bba3b96421c1a2071618343e8211a47b0b7 (patch) | |
tree | e3d51eb5614d86b30ea6c067d2ac868e1012ea12 /sonar-plugin-api/src/main | |
parent | 3ad8f1e60d8d161bb25d6f83e162d8812d58be98 (diff) | |
download | sonarqube-55e60bba3b96421c1a2071618343e8211a47b0b7.tar.gz sonarqube-55e60bba3b96421c1a2071618343e8211a47b0b7.zip |
Fix quality flaws
Diffstat (limited to 'sonar-plugin-api/src/main')
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/utils/Durations.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/Durations.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/Durations.java index 9b2dd159f3d..6f0eccafb45 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/Durations.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/Durations.java @@ -20,11 +20,11 @@ package org.sonar.api.utils; -import org.sonar.api.batch.BatchSide; import org.sonar.api.CoreProperties; -import org.sonar.api.server.ServerSide; +import org.sonar.api.batch.BatchSide; import org.sonar.api.config.Settings; import org.sonar.api.i18n.I18n; +import org.sonar.api.server.ServerSide; import javax.annotation.CheckForNull; @@ -116,15 +116,15 @@ public class Durations { private String format(Locale locale, int days, int hours, int minutes, boolean isNegative) { StringBuilder message = new StringBuilder(); if (days > 0) { - message.append(message(locale, "work_duration.x_days", isNegative ? -1 * days : days)); + message.append(message(locale, "work_duration.x_days", isNegative ? (-1 * days) : days)); } if (displayHours(days, hours)) { addSpaceIfNeeded(message); - message.append(message(locale, "work_duration.x_hours", isNegative && message.length() == 0 ? -1 * hours : hours)); + message.append(message(locale, "work_duration.x_hours", isNegative && message.length() == 0 ? (-1 * hours) : hours)); } if (displayMinutes(days, hours, minutes)) { addSpaceIfNeeded(message); - message.append(message(locale, "work_duration.x_minutes", isNegative && message.length() == 0 ? -1 * minutes : minutes)); + message.append(message(locale, "work_duration.x_minutes", isNegative && message.length() == 0 ? (-1 * minutes) : minutes)); } return message.toString(); } |