diff options
3 files changed, 3 insertions, 3 deletions
diff --git a/server/sonar-server/src/main/java/org/sonar/server/es/textsearch/ComponentTextSearchFeatureRepertoire.java b/server/sonar-server/src/main/java/org/sonar/server/es/textsearch/ComponentTextSearchFeatureRepertoire.java index 0a96cbf0e72..c97bb0b896a 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/es/textsearch/ComponentTextSearchFeatureRepertoire.java +++ b/server/sonar-server/src/main/java/org/sonar/server/es/textsearch/ComponentTextSearchFeatureRepertoire.java @@ -71,7 +71,7 @@ public enum ComponentTextSearchFeatureRepertoire implements ComponentTextSearchF if (tokens.isEmpty()) { return Stream.empty(); } - List<String> lowerCaseTokens = tokens.stream().map(t -> t.toLowerCase(Locale.getDefault())).collect(MoreCollectors.toList()); + List<String> lowerCaseTokens = tokens.stream().map(t -> t.toLowerCase(Locale.ENGLISH)).collect(MoreCollectors.toList()); BoolQueryBuilder queryBuilder = prefixAndPartialQuery(lowerCaseTokens, query.getFieldName(), SEARCH_PREFIX_CASE_INSENSITIVE_ANALYZER) .boost(2f); return Stream.of(queryBuilder); diff --git a/server/sonar-server/src/main/java/org/sonar/server/measure/index/ProjectsTextSearchQueryFactory.java b/server/sonar-server/src/main/java/org/sonar/server/measure/index/ProjectsTextSearchQueryFactory.java index 3b849d0bb53..c1520067639 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/measure/index/ProjectsTextSearchQueryFactory.java +++ b/server/sonar-server/src/main/java/org/sonar/server/measure/index/ProjectsTextSearchQueryFactory.java @@ -73,7 +73,7 @@ class ProjectsTextSearchQueryFactory { PREFIX_IGNORE_CASE { @Override QueryBuilder getQuery(String queryText) { - String lowerCaseQueryText = queryText.toLowerCase(Locale.getDefault()); + String lowerCaseQueryText = queryText.toLowerCase(Locale.ENGLISH); return prefixAndPartialQuery(lowerCaseQueryText, SORTABLE_ANALYZER.subField(FIELD_NAME), FIELD_NAME) .boost(3f); } diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/ParsingUtils.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/ParsingUtils.java index b85873c8c4c..d2dcbde4359 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/ParsingUtils.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/ParsingUtils.java @@ -53,7 +53,7 @@ public final class ParsingUtils { * @throws ParseException if number cannot be parsed */ public static double parseNumber(String number) throws ParseException { - return parseNumber(number, Locale.getDefault()); + return parseNumber(number, Locale.ENGLISH); } /** |