File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
java/com/google/openlocationcode Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 15
15
package com .google .openlocationcode ;
16
16
17
17
import java .math .BigDecimal ;
18
+ import java .util .Locale ;
18
19
19
20
/**
20
21
* Convert locations to and from convenient short codes.
@@ -153,7 +154,7 @@ public double getEastLongitude() {
153
154
* @constructor
154
155
*/
155
156
public OpenLocationCode (String code ) throws IllegalArgumentException {
156
- String newCode = code .toUpperCase ();
157
+ String newCode = code .toUpperCase (Locale . ROOT );
157
158
if (!isValidCode (newCode )) {
158
159
throw new IllegalArgumentException (
159
160
"The provided code '" + code + "' is not a valid Open Location Code." );
@@ -497,7 +498,7 @@ public static boolean isValidCode(String code) {
497
498
if (code == null || code .length () < 2 ) {
498
499
return false ;
499
500
}
500
- code = code .toUpperCase ();
501
+ code = code .toUpperCase (Locale . ROOT );
501
502
502
503
// There must be exactly one separator.
503
504
int separatorPosition = code .indexOf (SEPARATOR );
You can’t perform that action at this time.
0 commit comments