Author: ab Date: Wed Jun 18 14:34:17 2008 New Revision: 669300 URL: http://svn.apache.org/viewvc?rev=669300&view=rev Log: Avoid NPE when pocessing empty / corrupted indexes.
Modified: lucene/nutch/trunk/src/java/org/apache/nutch/indexer/DeleteDuplicates.java Modified: lucene/nutch/trunk/src/java/org/apache/nutch/indexer/DeleteDuplicates.java URL: http://svn.apache.org/viewvc/lucene/nutch/trunk/src/java/org/apache/nutch/indexer/DeleteDuplicates.java?rev=669300&r1=669299&r2=669300&view=diff ============================================================================== --- lucene/nutch/trunk/src/java/org/apache/nutch/indexer/DeleteDuplicates.java (original) +++ lucene/nutch/trunk/src/java/org/apache/nutch/indexer/DeleteDuplicates.java Wed Jun 18 14:34:17 2008 @@ -220,7 +220,7 @@ } public void close() throws IOException { - indexReader.close(); + if (indexReader != null) indexReader.close(); } public Text createKey() {