File tree Expand file tree Collapse file tree 5 files changed +17
-7
lines changed
src/main/java/org/apache/commons/codec/language Expand file tree Collapse file tree 5 files changed +17
-7
lines changed Original file line number Diff line number Diff line change 17
17
18
18
package org .apache .commons .codec .language ;
19
19
20
+ import java .util .Locale ;
21
+
20
22
/**
21
23
* Encodes a string into a Caverphone 1.0 value.
22
24
*
@@ -55,7 +57,7 @@ public String encode(final String source) {
55
57
}
56
58
57
59
// 1. Convert to lowercase
58
- txt = txt .toLowerCase (java . util . Locale .ENGLISH );
60
+ txt = txt .toLowerCase (Locale .ENGLISH );
59
61
60
62
// 2. Remove anything not A-Z
61
63
txt = txt .replaceAll ("[^a-z]" , "" );
Original file line number Diff line number Diff line change 17
17
18
18
package org .apache .commons .codec .language ;
19
19
20
+ import java .util .Locale ;
21
+
20
22
/**
21
23
* Encodes a string into a Caverphone 2.0 value.
22
24
*
@@ -55,7 +57,7 @@ public String encode(final String source) {
55
57
}
56
58
57
59
// 1. Convert to lowercase
58
- txt = txt .toLowerCase (java . util . Locale .ENGLISH );
60
+ txt = txt .toLowerCase (Locale .ENGLISH );
59
61
60
62
// 2. Remove anything not A-Z
61
63
txt = txt .replaceAll ("[^a-z]" , "" );
Original file line number Diff line number Diff line change 17
17
18
18
package org .apache .commons .codec .language ;
19
19
20
+ import java .util .Locale ;
21
+
20
22
import org .apache .commons .codec .EncoderException ;
21
23
import org .apache .commons .codec .StringEncoder ;
22
24
import org .apache .commons .codec .binary .StringUtils ;
@@ -248,7 +250,7 @@ private String cleanInput(String input) {
248
250
if (input .isEmpty ()) {
249
251
return null ;
250
252
}
251
- return input .toUpperCase (java . util . Locale .ENGLISH );
253
+ return input .toUpperCase (Locale .ENGLISH );
252
254
}
253
255
254
256
/**
Original file line number Diff line number Diff line change 17
17
18
18
package org .apache .commons .codec .language ;
19
19
20
+ import java .util .Locale ;
21
+
20
22
import org .apache .commons .codec .EncoderException ;
21
23
import org .apache .commons .codec .StringEncoder ;
22
24
@@ -175,10 +177,10 @@ public String metaphone(final String txt) {
175
177
}
176
178
// single character is itself
177
179
if (txtLength == 1 ) {
178
- return txt .toUpperCase (java . util . Locale .ENGLISH );
180
+ return txt .toUpperCase (Locale .ENGLISH );
179
181
}
180
182
181
- final char [] inwd = txt .toUpperCase (java . util . Locale .ENGLISH ).toCharArray ();
183
+ final char [] inwd = txt .toUpperCase (Locale .ENGLISH ).toCharArray ();
182
184
183
185
final StringBuilder local = new StringBuilder (40 ); // manipulate
184
186
final StringBuilder code = new StringBuilder (10 ); // output
Original file line number Diff line number Diff line change 17
17
18
18
package org .apache .commons .codec .language ;
19
19
20
+ import java .util .Locale ;
21
+
20
22
import org .apache .commons .codec .EncoderException ;
21
23
import org .apache .commons .codec .StringEncoder ;
22
24
@@ -50,9 +52,9 @@ static String clean(final String str) {
50
52
}
51
53
}
52
54
if (count == len ) {
53
- return str .toUpperCase (java . util . Locale .ENGLISH );
55
+ return str .toUpperCase (Locale .ENGLISH );
54
56
}
55
- return new String (chars , 0 , count ).toUpperCase (java . util . Locale .ENGLISH );
57
+ return new String (chars , 0 , count ).toUpperCase (Locale .ENGLISH );
56
58
}
57
59
58
60
/**
You can’t perform that action at this time.
0 commit comments