Skip to content

Commit 49e0d8b

Browse files
committed
Fix for "Aabjoe" test case.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/codec/trunk@1073220 13f79535-47bb-0310-9956-ffa450edef68
1 parent 3b0e93a commit 49e0d8b

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ public String colognePhonetic(String text) {
318318
nextChar = '-';
319319
}
320320

321-
if (arrayContains(new char[] { 'E', 'I', 'A', 'U', 'O', 'Y' }, chr)) {
321+
if (arrayContains(new char[] { 'A', 'E', 'I', 'J', 'O', 'U', 'Y' }, chr)) {
322322
code = '0';
323323
} else if (chr == 'H' || chr < 'A' || chr > 'Z') {
324324
if (lastCode == '/') {

src/test/org/apache/commons/codec/language/ColognePhoneticTest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ protected StringEncoder createEncoder() {
3030
return new ColognePhonetic();
3131
}
3232

33+
public void testAabjoe() {
34+
assertEquals("01", new ColognePhonetic().encode("Aabjoe"));
35+
}
36+
3337
public void testBorderCases() {
3438
ColognePhonetic koellePhon = new ColognePhonetic();
3539

0 commit comments

Comments
 (0)