commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1073220 - in /commons/proper/codec/trunk/src: java/org/apache/commons/codec/language/ColognePhonetic.java test/org/apache/commons/codec/language/ColognePhoneticTest.java
Date Tue, 22 Feb 2011 04:04:40 GMT
Author: ggregory
Date: Tue Feb 22 04:04:40 2011
New Revision: 1073220

URL: http://svn.apache.org/viewvc?rev=1073220&view=rev
Log:
Fix for "Aabjoe" test case.

Modified:
    commons/proper/codec/trunk/src/java/org/apache/commons/codec/language/ColognePhonetic.java
    commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/ColognePhoneticTest.java

Modified: commons/proper/codec/trunk/src/java/org/apache/commons/codec/language/ColognePhonetic.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/java/org/apache/commons/codec/language/ColognePhonetic.java?rev=1073220&r1=1073219&r2=1073220&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/java/org/apache/commons/codec/language/ColognePhonetic.java
(original)
+++ commons/proper/codec/trunk/src/java/org/apache/commons/codec/language/ColognePhonetic.java
Tue Feb 22 04:04:40 2011
@@ -318,7 +318,7 @@ public class ColognePhonetic implements 
                 nextChar = '-';
             }
 
-            if (arrayContains(new char[] { 'E', 'I', 'A', 'U', 'O', 'Y' }, chr)) {
+            if (arrayContains(new char[] { 'A', 'E', 'I', 'J', 'O', 'U', 'Y' }, chr)) {
                 code = '0';
             } else if (chr == 'H' || chr < 'A' || chr > 'Z') {
                 if (lastCode == '/') {

Modified: commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/ColognePhoneticTest.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/ColognePhoneticTest.java?rev=1073220&r1=1073219&r2=1073220&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/ColognePhoneticTest.java
(original)
+++ commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/ColognePhoneticTest.java
Tue Feb 22 04:04:40 2011
@@ -30,6 +30,10 @@ public class ColognePhoneticTest extends
         return new ColognePhonetic();
     }
 
+    public void testAabjoe() {
+        assertEquals("01", new ColognePhonetic().encode("Aabjoe"));
+    }
+
     public void testBorderCases() {
         ColognePhonetic koellePhon = new ColognePhonetic();
 



Mime
View raw message