commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1073481 - 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 20:07:30 GMT
Author: ggregory
Date: Tue Feb 22 20:07:29 2011
New Revision: 1073481

URL: http://svn.apache.org/viewvc?rev=1073481&view=rev
Log:
Fix double digit bug.

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=1073481&r1=1073480&r2=1073481&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 20:07:29 2011
@@ -368,10 +368,10 @@ public class ColognePhonetic implements 
 
             if (code != '-' && (lastCode != code && (code != '0' || lastCode
== '/') || code < '0' || code > '8')) {
                 left.addRight(code);
+                lastCode = code;
             }
 
             lastChar = chr;
-            lastCode = code;
         }
         return left.toString();
     }

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=1073481&r1=1073480&r2=1073481&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 20:07:29 2011
@@ -129,7 +129,7 @@ public class ColognePhoneticTest extends
             {"peter", "127"},
             {"pharma", "376"},
             {"bergisch-gladbach", "174845214"},
-            {"mönchengladbach", "664645214"},
+            {"mönchengladbach", "64645214"},
             {"deutsch", "28"},
             {"deutz", "28"},
             {"hamburg", "06174"},
@@ -141,8 +141,8 @@ public class ColognePhoneticTest extends
             {"matsch", "68"},
             {"matz", "68"},
             {"Arbeitsamt", "071862"},
-           // {"Eberhard", "01772"}, BUG: 77 should be 7
-           // {"Eberhardt", "01772"}, BUG: 77 should be 7
+            {"Eberhard", "0172"},
+            {"Eberhardt", "0172"},
             {"heithabu", "021"},
             {"Müller-Lüdenscheidt", "65752682"},};
         this.checkEncodings(data);



Mime
View raw message