Skip to content

Commit 519cfe5

Browse files
committed
// comments.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/codec/trunk@130416 13f79535-47bb-0310-9956-ffa450edef68
1 parent c7e8f03 commit 519cfe5

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/java/org/apache/commons/codec/language/Soundex.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
* general purpose scheme to find word with similar phonemes.
2525
*
2626
* @author Apache Software Foundation
27-
* @version $Id: Soundex.java,v 1.26 2004/07/07 23:15:24 ggregory Exp $
27+
* @version $Id: Soundex.java,v 1.27 2004/09/08 17:44:41 ggregory Exp $
2828
*/
2929
public class Soundex implements StringEncoder {
3030

@@ -162,6 +162,7 @@ public String encode(String pString) {
162162
* if the character is not mapped
163163
*/
164164
private char getMappingCode(String str, int index) {
165+
// map() throws IllegalArgumentException
165166
char mappedChar = this.map(str.charAt(index));
166167
// HW rule check
167168
if (index > 1 && mappedChar != '0') {
@@ -255,6 +256,7 @@ public String soundex(String str) {
255256
char last, mapped;
256257
int incount = 1, count = 1;
257258
out[0] = str.charAt(0);
259+
// getMappingCode() throws IllegalArgumentException
258260
last = getMappingCode(str, 0);
259261
while ((incount < str.length()) && (count < out.length)) {
260262
mapped = getMappingCode(str, incount++);

0 commit comments

Comments
 (0)