You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@manifoldcf.apache.org by kw...@apache.org on 2019/03/21 23:54:44 UTC

svn commit: r1856014 - /manifoldcf/branches/CONNECTORS-1566/connectors/csws/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/csws/CswsConnector.java

Author: kwright
Date: Thu Mar 21 23:54:43 2019
New Revision: 1856014

URL: http://svn.apache.org/viewvc?rev=1856014&view=rev
Log:
More work

Modified:
    manifoldcf/branches/CONNECTORS-1566/connectors/csws/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/csws/CswsConnector.java

Modified: manifoldcf/branches/CONNECTORS-1566/connectors/csws/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/csws/CswsConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1566/connectors/csws/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/csws/CswsConnector.java?rev=1856014&r1=1856013&r2=1856014&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-1566/connectors/csws/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/csws/CswsConnector.java (original)
+++ manifoldcf/branches/CONNECTORS-1566/connectors/csws/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/csws/CswsConnector.java Thu Mar 21 23:54:43 2019
@@ -958,38 +958,48 @@ public class CswsConnector extends org.a
       {
         // Do ListUsers and enumerate the values.
         final ListUsersThread t = new ListUsersThread();
-        t.start();
-        final PageHandle resultPageHandle = t.finishUp();
-        
-        // Now walk through the results and add them
-        while (true) {
-          final GetUserResultsThread t = new GetUserResultsThread(resultPageHandle);
+        try {
           t.start();
-          final List<? extends Member> childrenDocs = t.finishUp();
-          if (childrenDocs == null) {
-            // We're done
-            break;
-          }
+          final PageHandle resultPageHandle = t.finishUp();
+        
+          // Now walk through the results and add them
+          while (true) {
+            final GetUserResultsThread t = new GetUserResultsThread(resultPageHandle);
+            try {
+              t.start();
+              final List<? extends Member> childrenDocs = t.finishUp();
+              if (childrenDocs == null) {
+                // We're done
+                break;
+              }
             
-          for (final Member m : childrenDocs)
-          {
-            final long childID = m.getID();
+              for (final Member m : childrenDocs)
+              {
+                final long childID = m.getID();
             
-            // Skip admin user
-            if (childID == 1000L || childID == 1001L)
-              continue;
+                // Skip admin user
+                if (childID == 1000L || childID == 1001L)
+                  continue;
                 
-            if (Logging.connectors.isDebugEnabled())
-              Logging.connectors.debug("Csws: Found a user: ID="+childID);
+                if (Logging.connectors.isDebugEnabled())
+                  Logging.connectors.debug("Csws: Found a user: ID="+childID);
 
-            activities.addSeedDocument("F0:"+childID);
+                activities.addSeedDocument("F0:"+childID);
+              }
+            }
+            catch (InterruptedException e)
+            {
+              t.interrupt();
+              throw new ManifoldCFException("Interrupted: "+e.getMessage(),e,ManifoldCFException.INTERRUPTED);
+            }
           }
         }
-      }
-      catch (InterruptedException e)
-      {
-        t.interrupt();
-        throw new ManifoldCFException("Interrupted: "+e.getMessage(),e,ManifoldCFException.INTERRUPTED);
+        catch (InterruptedException e)
+        {
+          t.interrupt();
+          throw new ManifoldCFException("Interrupted: "+e.getMessage(),e,ManifoldCFException.INTERRUPTED);
+        }
+
       }
       
     }
@@ -3169,7 +3179,7 @@ public class CswsConnector extends org.a
 
       final String[] rval = new String[children.size()];
       int j = 0;
-      while (final SGraph sg : children)
+      for (final SGraph sg : children)
       {
         rval[j++] = getString(sg, 0);
       }
@@ -3926,11 +3936,11 @@ public class CswsConnector extends org.a
             // illegal node.
             return null;
           }
-          catch (InterruptedException e)
-          {
-            t.interrupt();
-            throw new ManifoldCFException("Interrupted: "+e.getMessage(),e,ManifoldCFException.INTERRUPTED);
-          }
+        }
+        catch (InterruptedException e)
+        {
+          t.interrupt();
+          throw new ManifoldCFException("Interrupted: "+e.getMessage(),e,ManifoldCFException.INTERRUPTED);
         }
 
       }