diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2016-04-06 10:23:06 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2016-04-06 10:23:06 +0200 |
commit | 9e8e346e71b304fcf7aeb4e4f4c9a3c7107e1a53 (patch) | |
tree | 9be0ec5f72b5b6eb95871c50fab3b8f180de0b59 /sonar-plugin-api | |
parent | a5db81075b825ee87df9c64e3f1f2a32cdb4d72b (diff) | |
download | sonarqube-9e8e346e71b304fcf7aeb4e4f4c9a3c7107e1a53.tar.gz sonarqube-9e8e346e71b304fcf7aeb4e4f4c9a3c7107e1a53.zip |
Fix quality flaws
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/rules/RulePriority.java | 3 | ||||
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/test/TestCase.java | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/rules/RulePriority.java b/sonar-plugin-api/src/main/java/org/sonar/api/rules/RulePriority.java index 60015b4777d..a96b91364e8 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/rules/RulePriority.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/rules/RulePriority.java @@ -19,6 +19,7 @@ */ package org.sonar.api.rules; +import java.util.Locale; import org.sonar.check.Priority; /** @@ -46,7 +47,7 @@ public enum RulePriority { @Deprecated public static RulePriority valueOfString(String level) { try { - return RulePriority.valueOf(level.toUpperCase()); + return RulePriority.valueOf(level.toUpperCase(Locale.ENGLISH)); } catch (IllegalArgumentException ex) { // backward compatibility diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/test/TestCase.java b/sonar-plugin-api/src/main/java/org/sonar/api/test/TestCase.java index e5c35aa1320..2b6d27b582d 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/test/TestCase.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/test/TestCase.java @@ -19,6 +19,7 @@ */ package org.sonar.api.test; +import java.util.Locale; import javax.annotation.CheckForNull; import javax.annotation.Nullable; @@ -31,7 +32,7 @@ public interface TestCase { OK, FAILURE, ERROR, SKIPPED; public static Status of(@Nullable String s) { - return s == null ? null : valueOf(s.toUpperCase()); + return s == null ? null : valueOf(s.toUpperCase(Locale.ENGLISH)); } } |