File tree Expand file tree Collapse file tree 3 files changed +219
-63
lines changed
main/java/org/springframework/util
test/java/org/springframework/util Expand file tree Collapse file tree 3 files changed +219
-63
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2013 the original author or authors.
2
+ * Copyright 2002-2014 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
51
51
* @author Rick Evans
52
52
* @author Arjen Poutsma
53
53
* @since 16 April 2001
54
- * @see org.apache.commons.lang.StringUtils
55
54
*/
56
55
public abstract class StringUtils {
57
56
@@ -696,7 +695,7 @@ public static Locale parseLocaleString(String localeString) {
696
695
if (parts .length > 2 ) {
697
696
// There is definitely a variant, and it is everything after the country
698
697
// code sans the separator between the country code and the variant.
699
- int endIndexOfCountryCode = localeString .lastIndexOf (country ) + country .length ();
698
+ int endIndexOfCountryCode = localeString .indexOf (country , language . length () ) + country .length ();
700
699
// Strip off any leading '_' and whitespace, what's left is the variant.
701
700
variant = trimLeadingWhitespace (localeString .substring (endIndexOfCountryCode ));
702
701
if (variant .startsWith ("_" )) {
You can’t perform that action at this time.
0 commit comments