Author: ab
Date: Sat Apr  7 09:44:02 2007
New Revision: 526455

URL: http://svn.apache.org/viewvc?view=rev&rev=526455
Log:
Empty MapWritable would throw an NPE when building a keySet.

Modified:
    lucene/nutch/trunk/src/java/org/apache/nutch/crawl/MapWritable.java

Modified: lucene/nutch/trunk/src/java/org/apache/nutch/crawl/MapWritable.java
URL: 
http://svn.apache.org/viewvc/lucene/nutch/trunk/src/java/org/apache/nutch/crawl/MapWritable.java?view=diff&rev=526455&r1=526454&r2=526455
==============================================================================
--- lucene/nutch/trunk/src/java/org/apache/nutch/crawl/MapWritable.java 
(original)
+++ lucene/nutch/trunk/src/java/org/apache/nutch/crawl/MapWritable.java Sat Apr 
 7 09:44:02 2007
@@ -175,6 +175,7 @@
 
   public Set keySet() {
     HashSet set = new HashSet();
+    if (isEmpty()) return set;
     set.add(fFirst.fKey);
     KeyValueEntry entry = fFirst;
     while ((entry = entry.fNextEntry) != null) {



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Nutch-cvs mailing list
Nutch-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nutch-cvs

Reply via email to