Skip to content

Commit 5534120

Browse files
authored
fix locale in PointRangeQueryBuilder (#15076)
Was using Locale.getDefault(), which will break on some locales. Signed-off-by: Sandesh Kumar <[email protected]>
1 parent cb16075 commit 5534120

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lucene/queryparser/src/java/org/apache/lucene/queryparser/xml/builders/PointRangeQueryBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public Query getQuery(Element e) throws ParserException {
7676
String field = DOMUtils.getAttributeWithInheritanceOrFail(e, "fieldName");
7777
final String lowerTerm = DOMUtils.getAttribute(e, "lowerTerm", null);
7878
final String upperTerm = DOMUtils.getAttribute(e, "upperTerm", null);
79-
String type = DOMUtils.getAttribute(e, "type", "int").toLowerCase(Locale.getDefault());
79+
String type = DOMUtils.getAttribute(e, "type", "int").toLowerCase(Locale.ROOT);
8080

8181
try {
8282
return switch (type) {

0 commit comments

Comments
 (0)