c-w commented on a change in pull request #766:
URL: https://github.com/apache/commons-lang/pull/766#discussion_r763190834
##########
File path: src/main/java/org/apache/commons/lang3/LocaleUtils.java
##########
@@ -248,7 +250,9 @@ private static Locale parseLocale(final String str) {
return new Locale(str);
}
- final String[] segments = str.split("_", -1);
+ final String[] segments = str.indexOf(DASH) != -1
+ ? str.split(String.valueOf(DASH), -1)
Review comment:
All the unit tests still pass with the comparison swapped. I made the
change in 0319d84d1. It's probably the right thing to do to optimize for the
previous delimiter as that'll be the vast majority of use-cases.
--
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]