summaryrefslogtreecommitdiffstats
path: root/sonar-db
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2016-04-06 10:23:06 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2016-04-06 10:23:06 +0200
commit9e8e346e71b304fcf7aeb4e4f4c9a3c7107e1a53 (patch)
tree9be0ec5f72b5b6eb95871c50fab3b8f180de0b59 /sonar-db
parenta5db81075b825ee87df9c64e3f1f2a32cdb4d72b (diff)
downloadsonarqube-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.java2
-rw-r--r--sonar-db/src/main/java/org/sonar/db/qualityprofile/QualityProfileDao.java3
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) {