You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ms...@apache.org on 2025/08/21 18:02:49 UTC
(lucene) branch main updated: fix locale in PointRangeQueryBuilder (#15076)
This is an automated email from the ASF dual-hosted git repository.
msfroh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/lucene.git
The following commit(s) were added to refs/heads/main by this push:
new 5534120dab4 fix locale in PointRangeQueryBuilder (#15076)
5534120dab4 is described below
commit 5534120dab454dfdb75d52211b95729fa4f1dacb
Author: Sandesh Kumar <sa...@gmail.com>
AuthorDate: Thu Aug 21 11:02:44 2025 -0700
fix locale in PointRangeQueryBuilder (#15076)
Was using Locale.getDefault(), which will break on some locales.
Signed-off-by: Sandesh Kumar <sa...@gmail.com>
---
.../apache/lucene/queryparser/xml/builders/PointRangeQueryBuilder.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/xml/builders/PointRangeQueryBuilder.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/xml/builders/PointRangeQueryBuilder.java
index 489baf1436c..4e806743597 100644
--- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/xml/builders/PointRangeQueryBuilder.java
+++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/xml/builders/PointRangeQueryBuilder.java
@@ -76,7 +76,7 @@ public class PointRangeQueryBuilder implements QueryBuilder {
String field = DOMUtils.getAttributeWithInheritanceOrFail(e, "fieldName");
final String lowerTerm = DOMUtils.getAttribute(e, "lowerTerm", null);
final String upperTerm = DOMUtils.getAttribute(e, "upperTerm", null);
- String type = DOMUtils.getAttribute(e, "type", "int").toLowerCase(Locale.getDefault());
+ String type = DOMUtils.getAttribute(e, "type", "int").toLowerCase(Locale.ROOT);
try {
return switch (type) {