diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2014-03-13 09:05:24 +0100 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2014-03-13 12:10:58 +0100 |
commit | 9aa415c8a2ef82dcd3e7b9b193d51deed6dca674 (patch) | |
tree | 9312a9d7f50c0d715c1b3f7b004f771d4de7a1d2 /sonar-plugin-api/src | |
parent | ed29dd10b36dbc71c1b71a0127fba2b779646dcd (diff) | |
download | sonarqube-9aa415c8a2ef82dcd3e7b9b193d51deed6dca674.tar.gz sonarqube-9aa415c8a2ef82dcd3e7b9b193d51deed6dca674.zip |
Fix quality flaws
Diffstat (limited to 'sonar-plugin-api/src')
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/server/rule/RuleDefinitions.java | 1 | ||||
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/utils/Durations.java | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/server/rule/RuleDefinitions.java b/sonar-plugin-api/src/main/java/org/sonar/api/server/rule/RuleDefinitions.java index 148829aef55..3c7cfc9f251 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/server/rule/RuleDefinitions.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/server/rule/RuleDefinitions.java @@ -377,7 +377,6 @@ public interface RuleDefinitions extends ServerExtension { } public NewRule setCharacteristicKey(@Nullable String characteristicKey) { - // TODO validate characteristic exists and it's a sub characteristic this.characteristicKey = characteristicKey; return this; } 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 0045ef1f046..4b7cf060cac 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 @@ -97,6 +97,10 @@ public class Durations implements BatchComponent, ServerComponent { remainingDuration = remainingDuration - (hours * 60); int minutes = remainingDuration.intValue(); + return format(locale, days, hours, minutes, isNegative); + } + + 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)); |