This is an automated email from the ASF dual-hosted git repository.
paulk-asert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/master by this push:
new 16a26e16c5 use Locale.ROOT in CharSequenceValue.toEnum case fallback
16a26e16c5 is described below
commit 16a26e16c58d080d7f8f60f6aed1754d9dfd87a2
Author: netliomax25-code <[email protected]>
AuthorDate: Fri May 29 00:12:22 2026 +0530
use Locale.ROOT in CharSequenceValue.toEnum case fallback
---
.../main/java/org/apache/groovy/json/internal/CharSequenceValue.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
a/subprojects/groovy-json/src/main/java/org/apache/groovy/json/internal/CharSequenceValue.java
b/subprojects/groovy-json/src/main/java/org/apache/groovy/json/internal/CharSequenceValue.java
index facea9a6e4..de8491fe66 100644
---
a/subprojects/groovy-json/src/main/java/org/apache/groovy/json/internal/CharSequenceValue.java
+++
b/subprojects/groovy-json/src/main/java/org/apache/groovy/json/internal/CharSequenceValue.java
@@ -24,6 +24,7 @@ import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Arrays;
import java.util.Date;
+import java.util.Locale;
import java.util.Objects;
import static org.apache.groovy.json.internal.CharScanner.isInteger;
@@ -131,7 +132,7 @@ public class CharSequenceValue implements Value,
CharSequence {
try {
return (T) Enum.valueOf(cls, value);
} catch (Exception ex) {
- return (T) Enum.valueOf(cls, value.toUpperCase().replace('-',
'_'));
+ return (T) Enum.valueOf(cls,
value.toUpperCase(Locale.ROOT).replace('-', '_'));
}
}