DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=31096>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=31096 Deprecated calls and 1 failure in the SoundexTest ------- Additional Comments From [EMAIL PROTECTED] 2004-09-08 17:45 ------- The key lines in the attachement (http://issues.apache.org/bugzilla/showattachment.cgi?attach_id=12665) are: Testcase: testUsMappingOWithDiaeresis took 0.011 sec FAILED expected:<?000> but was:<> junit.framework.ComparisonFailure: expected:<?000> but was:<> at org.apache.commons.codec.language.SoundexTest.testUsMappingOWithDiaeresis(SoundexTest.java:348) Looking at testUsMappingOWithDiaeresis(SoundexTest.java:348) we see: /** * Fancy characters are not mapped by the default US mapping. * * http://nagoya.apache.org/bugzilla/show_bug.cgi?id=29080 */ public void testUsMappingOWithDiaeresis() { assertEquals("O000", this.getEncoder().encode("o")); try { assertEquals("Ö000", this.getEncoder().encode("ö")); fail("Expected IllegalArgumentException not thrown"); } catch (IllegalArgumentException e) { // expected } } The second assertEquals line uses an "O" and "o" with diaeresis. The fisrt assertEquals line does not. SoundexTest.java version 1.18 (tagged CODEC_1_3) shows line 348 to be the 2nd assertEquals. What is interesting is that the test call encode() to is designed to fail with an IllegalArgumentException but it does not in your case. Instead the call to encode() works and the assertEquals then fails. So the next question is: why does encode() work when the tests think it should not? Also the encoded value appears to be the empty string which is also weird. Perhaps the following takes place: Soundex.encode() calls Soundex.soundex(); is it the case that the only way for the return value to be "" is for the call to clean() to reject the "O" with diaeresis and all other letters and return an ""? Then soundex() just returns, otherwise it would throw an IllegalArgumentException. Have changed any of the source for codec or the tests. Maybe just saving a .java file messed up the Unicode values in the file. A .java file is a Unicode text file, not a plain text file. Please let us know, thanks. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
