Author: siren
Date: Fri Jan 12 14:12:15 2007
New Revision: 495762

URL: http://svn.apache.org/viewvc?view=rev&rev=495762
Log:
NUTCH-428

Modified:
    lucene/nutch/trunk/CHANGES.txt
    
lucene/nutch/trunk/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/RobotRulesParser.java

Modified: lucene/nutch/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/lucene/nutch/trunk/CHANGES.txt?view=diff&rev=495762&r1=495761&r2=495762
==============================================================================
--- lucene/nutch/trunk/CHANGES.txt (original)
+++ lucene/nutch/trunk/CHANGES.txt Fri Jan 12 14:12:15 2007
@@ -131,6 +131,9 @@
 42. NUTCH-420 - Fix a bug in DeleteDuplicates where results depended on the
     order in which IndexDoc-s are processed. (Dogacan Guney via ab)
 
+43. NUTCH-428 - NullPointerException thrown when agent name is not
+    configured properly. Changed to throw RuntimeException instead.
+
 
 Release 0.8 - 2006-07-25
 

Modified: 
lucene/nutch/trunk/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/RobotRulesParser.java
URL: 
http://svn.apache.org/viewvc/lucene/nutch/trunk/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/RobotRulesParser.java?view=diff&rev=495762&r1=495761&r2=495762
==============================================================================
--- 
lucene/nutch/trunk/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/RobotRulesParser.java
 (original)
+++ 
lucene/nutch/trunk/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/RobotRulesParser.java
 Fri Jan 12 14:12:15 2007
@@ -223,6 +223,9 @@
     // Grab the agent names we advertise to robots files.
     //
     String agentName = conf.get("http.agent.name");
+    if (null == agentName) {
+      throw new RuntimeException("Agent name not configured!");
+    }
     String agentNames = conf.get("http.robots.agents");
     StringTokenizer tok = new StringTokenizer(agentNames, ",");
     ArrayList agents = new ArrayList();


Reply via email to