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-db | |
parent | a5db81075b825ee87df9c64e3f1f2a32cdb4d72b (diff) | |
download | sonarqube-9e8e346e71b304fcf7aeb4e4f4c9a3c7107e1a53.tar.gz sonarqube-9e8e346e71b304fcf7aeb4e4f4c9a3c7107e1a53.zip |
Fix quality flaws
Diffstat (limited to 'sonar-db')
-rw-r--r-- | sonar-db/src/main/java/org/sonar/db/qualityprofile/ActiveRuleKey.java | 2 | ||||
-rw-r--r-- | sonar-db/src/main/java/org/sonar/db/qualityprofile/QualityProfileDao.java | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/sonar-db/src/main/java/org/sonar/db/qualityprofile/ActiveRuleKey.java b/sonar-db/src/main/java/org/sonar/db/qualityprofile/ActiveRuleKey.java index 3077a4e80a2..46c3d54d5cb 100644 --- a/sonar-db/src/main/java/org/sonar/db/qualityprofile/ActiveRuleKey.java +++ b/sonar-db/src/main/java/org/sonar/db/qualityprofile/ActiveRuleKey.java @@ -52,7 +52,7 @@ public class ActiveRuleKey implements Serializable, Comparable<ActiveRuleKey> { */ public static ActiveRuleKey parse(String s) { Preconditions.checkArgument(s.split(":").length >= 3, "Bad format of activeRule key: " + s); - int semiColonPos = s.indexOf(":"); + int semiColonPos = s.indexOf(':'); String key = s.substring(0, semiColonPos); String ruleKey = s.substring(semiColonPos + 1); return ActiveRuleKey.of(key, RuleKey.parse(ruleKey)); diff --git a/sonar-db/src/main/java/org/sonar/db/qualityprofile/QualityProfileDao.java b/sonar-db/src/main/java/org/sonar/db/qualityprofile/QualityProfileDao.java index 8429f7f8207..c1caf994393 100644 --- a/sonar-db/src/main/java/org/sonar/db/qualityprofile/QualityProfileDao.java +++ b/sonar-db/src/main/java/org/sonar/db/qualityprofile/QualityProfileDao.java @@ -26,6 +26,7 @@ import com.google.common.collect.Maps; import java.util.Collection; import java.util.Date; import java.util.List; +import java.util.Locale; import java.util.Map; import javax.annotation.CheckForNull; import javax.annotation.Nonnull; @@ -374,7 +375,7 @@ public class QualityProfileDao implements Dao { } private String sqlQueryString(String query) { - return query == null ? "%" : "%" + query.toUpperCase() + "%"; + return query == null ? "%" : "%" + query.toUpperCase(Locale.ENGLISH) + "%"; } private static QualityProfileMapper mapper(DbSession session) { |