incubator-connectors-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r979192 - /incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/WebcrawlerConnector.java
Date Mon, 26 Jul 2010 08:25:19 GMT
Author: kwright
Date: Mon Jul 26 08:25:19 2010
New Revision: 979192

URL: http://svn.apache.org/viewvc?rev=979192&view=rev
Log:
Same problem, different place.  The return of null instead of empty string for getvalue is
likely to have repercussions in other connectors too; need to do a complete audit.

Modified:
    incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/WebcrawlerConnector.java

Modified: incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/WebcrawlerConnector.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/WebcrawlerConnector.java?rev=979192&r1=979191&r2=979192&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/WebcrawlerConnector.java
(original)
+++ incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/WebcrawlerConnector.java
Mon Jul 26 08:25:19 2010
@@ -4044,11 +4044,23 @@ public class WebcrawlerConnector extends
     {
       SpecificationNode sn = ds.getChild(i++);
       if (sn.getType().equals(org.apache.lcf.crawler.connectors.webcrawler.WebcrawlerConfig.NODE_SEEDS))
+      {
         seeds = sn.getValue();
+        if (seeds == null)
+          seeds = "";
+      }
       else if (sn.getType().equals(org.apache.lcf.crawler.connectors.webcrawler.WebcrawlerConfig.NODE_INCLUDES))
+      {
         inclusions = sn.getValue();
+        if (inclusions == null)
+          inclusions = "";
+      }
       else if (sn.getType().equals(org.apache.lcf.crawler.connectors.webcrawler.WebcrawlerConfig.NODE_EXCLUDES))
+      {
         exclusions = sn.getValue();
+        if (exclusions == null)
+          exclusions = "";
+      }
     }
     out.print(
 "<table class=\"displaytable\">\n"+
@@ -7074,9 +7086,17 @@ public class WebcrawlerConnector extends
       {
         SpecificationNode sn = spec.getChild(i++);
         if (sn.getType().equals(WebcrawlerConfig.NODE_INCLUDES))
+        {
           includes = sn.getValue();
+          if (includes == null)
+            includes = "";
+        }
         else if (sn.getType().equals(WebcrawlerConfig.NODE_EXCLUDES))
+        {
           excludes = sn.getValue();
+          if (excludes == null)
+            excludes = "";
+        }
         else if (sn.getType().equals("urlspec"))
         {
           String urlRegexp = sn.getAttributeValue("regexp");



Mime
View raw message