manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1428135 - in /manifoldcf/trunk/connectors: rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/ webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/
Date Thu, 03 Jan 2013 01:47:36 GMT
Author: kwright
Date: Thu Jan  3 01:47:36 2013
New Revision: 1428135

URL: http://svn.apache.org/viewvc?rev=1428135&view=rev
Log:
Fix NPE that results when fetch is aborted before it starts.

Modified:
    manifoldcf/trunk/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/ThrottledFetcher.java
    manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/ThrottledFetcher.java

Modified: manifoldcf/trunk/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/ThrottledFetcher.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/ThrottledFetcher.java?rev=1428135&r1=1428134&r2=1428135&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/ThrottledFetcher.java
(original)
+++ manifoldcf/trunk/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/ThrottledFetcher.java
Thu Jan  3 01:47:36 2013
@@ -681,7 +681,8 @@ public class ThrottledFetcher
       
       if (fetchType != null)
       {
-        methodThread.abort();
+        if (methodThread != null && threadStarted)
+          methodThread.abort();
         long endTime = System.currentTimeMillis();
         server.endFetch();
 

Modified: manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/ThrottledFetcher.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/ThrottledFetcher.java?rev=1428135&r1=1428134&r2=1428135&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/ThrottledFetcher.java
(original)
+++ manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/ThrottledFetcher.java
Thu Jan  3 01:47:36 2013
@@ -1806,7 +1806,8 @@ public class ThrottledFetcher
       if (fetchType != null)
       {
         // Abort the connection, if not already complete
-        methodThread.abort();
+        if (methodThread != null && threadStarted)
+          methodThread.abort();
 
         long endTime = System.currentTimeMillis();
         int i = 0;



Mime
View raw message