Author: dogacan Date: Sat Sep 29 04:02:01 2007 New Revision: 580572 URL: http://svn.apache.org/viewvc?rev=580572&view=rev Log: Yet another java5 compatibility fix for NUTCH-25. Updates unit test.
Modified: lucene/nutch/trunk/src/test/org/apache/nutch/util/TestEncodingDetector.java Modified: lucene/nutch/trunk/src/test/org/apache/nutch/util/TestEncodingDetector.java URL: http://svn.apache.org/viewvc/lucene/nutch/trunk/src/test/org/apache/nutch/util/TestEncodingDetector.java?rev=580572&r1=580571&r2=580572&view=diff ============================================================================== --- lucene/nutch/trunk/src/test/org/apache/nutch/util/TestEncodingDetector.java (original) +++ lucene/nutch/trunk/src/test/org/apache/nutch/util/TestEncodingDetector.java Sat Sep 29 04:02:01 2007 @@ -1,7 +1,6 @@ package org.apache.nutch.util; import java.io.UnsupportedEncodingException; -import java.nio.charset.Charset; import org.apache.hadoop.conf.Configuration; import org.apache.nutch.metadata.Metadata; @@ -58,9 +57,9 @@ contentInOctets, "text/plain", metadata, conf); detector = new EncodingDetector(conf); detector.autoDetectClues(content, true); - detector.addClue("utf-32", "sniffed"); + detector.addClue("windows-1254", "sniffed"); encoding = detector.guessEncoding(content, "windows-1252"); - assertEquals("utf-32", encoding.toLowerCase()); + assertEquals("windows-1254", encoding.toLowerCase()); // enable autodetection conf.setInt(EncodingDetector.MIN_CONFIDENCE_KEY, 50);