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 1717
1818package org .apache .commons .codec .language ;
1919
20+ import java .util .Locale ;
21+
2022/**
2123 * Encodes a string into a Caverphone 1.0 value.
2224 *
@@ -55,7 +57,7 @@ public String encode(final String source) {
5557 }
5658
5759 // 1. Convert to lowercase
58- txt = txt .toLowerCase (java . util . Locale .ENGLISH );
60+ txt = txt .toLowerCase (Locale .ENGLISH );
5961
6062 // 2. Remove anything not A-Z
6163 txt = txt .replaceAll ("[^a-z]" , "" );
Original file line number Diff line number Diff line change 1717
1818package org .apache .commons .codec .language ;
1919
20+ import java .util .Locale ;
21+
2022/**
2123 * Encodes a string into a Caverphone 2.0 value.
2224 *
@@ -55,7 +57,7 @@ public String encode(final String source) {
5557 }
5658
5759 // 1. Convert to lowercase
58- txt = txt .toLowerCase (java . util . Locale .ENGLISH );
60+ txt = txt .toLowerCase (Locale .ENGLISH );
5961
6062 // 2. Remove anything not A-Z
6163 txt = txt .replaceAll ("[^a-z]" , "" );
Original file line number Diff line number Diff line change 1717
1818package org .apache .commons .codec .language ;
1919
20+ import java .util .Locale ;
21+
2022import org .apache .commons .codec .EncoderException ;
2123import org .apache .commons .codec .StringEncoder ;
2224import org .apache .commons .codec .binary .StringUtils ;
@@ -248,7 +250,7 @@ private String cleanInput(String input) {
248250 if (input .isEmpty ()) {
249251 return null ;
250252 }
251- return input .toUpperCase (java . util . Locale .ENGLISH );
253+ return input .toUpperCase (Locale .ENGLISH );
252254 }
253255
254256 /**
Original file line number Diff line number Diff line change 1717
1818package org .apache .commons .codec .language ;
1919
20+ import java .util .Locale ;
21+
2022import org .apache .commons .codec .EncoderException ;
2123import org .apache .commons .codec .StringEncoder ;
2224
@@ -175,10 +177,10 @@ public String metaphone(final String txt) {
175177 }
176178 // single character is itself
177179 if (txtLength == 1 ) {
178- return txt .toUpperCase (java . util . Locale .ENGLISH );
180+ return txt .toUpperCase (Locale .ENGLISH );
179181 }
180182
181- final char [] inwd = txt .toUpperCase (java . util . Locale .ENGLISH ).toCharArray ();
183+ final char [] inwd = txt .toUpperCase (Locale .ENGLISH ).toCharArray ();
182184
183185 final StringBuilder local = new StringBuilder (40 ); // manipulate
184186 final StringBuilder code = new StringBuilder (10 ); // output
Original file line number Diff line number Diff line change 1717
1818package org .apache .commons .codec .language ;
1919
20+ import java .util .Locale ;
21+
2022import org .apache .commons .codec .EncoderException ;
2123import org .apache .commons .codec .StringEncoder ;
2224
@@ -50,9 +52,9 @@ static String clean(final String str) {
5052 }
5153 }
5254 if (count == len ) {
53- return str .toUpperCase (java . util . Locale .ENGLISH );
55+ return str .toUpperCase (Locale .ENGLISH );
5456 }
55- return new String (chars , 0 , count ).toUpperCase (java . util . Locale .ENGLISH );
57+ return new String (chars , 0 , count ).toUpperCase (Locale .ENGLISH );
5658 }
5759
5860 /**
You can’t perform that action at this time.
0 commit comments