Skip to content

armgit / nutch

Public Imported from GitHub
0

Apache Nutch is an extensible and scalable web crawler

NUTCH-428

Sami Siren5f260bf7b7cf
diff --git a/CHANGES.txt b/CHANGES.txt
index 761226131..c60aa7276 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -131,6 +131,9 @@ Unreleased changes (0.9-dev)
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
diff --git a/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/RobotRulesParser.java b/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/RobotRulesParser.java
index fa3da1939..a8dcb8269 100644
--- a/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/RobotRulesParser.java
+++ b/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/RobotRulesParser.java
@@ -223,6 +223,9 @@ public class RobotRulesParser implements Configurable {
// 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();