dxbjavid commented on code in PR #753:
URL: https://github.com/apache/commons-text/pull/753#discussion_r3409018259
##########
src/main/java/org/apache/commons/text/lookup/StringLookupFactory.java:
##########
@@ -328,7 +328,7 @@ private static Map<String, StringLookup>
parseStringLookups(final String str) {
try {
for (final String lookupName : str.split("[\\s,]+")) {
if (!lookupName.isEmpty()) {
-
addLookup(DefaultStringLookup.valueOf(lookupName.toUpperCase()), lookupMap);
+
addLookup(DefaultStringLookup.valueOf(lookupName.toUpperCase(Locale.ROOT)),
lookupMap);
Review Comment:
added a test for it.
testDefaultStringLookupsHolder_givenSingleLookup_localeIndependent feeds a
lowercase "file" through the holder under a tr-TR default locale; without
Locale.ROOT the upper-case folds the i to dotted İ and valueOf throws, so the
test fails on the unpatched code and passes with the fix.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]