diff options
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) { |