manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1750746 - /manifoldcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java
Date Thu, 30 Jun 2016 06:44:00 GMT
Author: kwright
Date: Thu Jun 30 06:44:00 2016
New Revision: 1750746

URL: http://svn.apache.org/viewvc?rev=1750746&view=rev
Log:
Additional fix for CONNECTORS-1325.

Modified:
    manifoldcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java

Modified: manifoldcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java?rev=1750746&r1=1750745&r2=1750746&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java
(original)
+++ manifoldcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java
Thu Jun 30 06:44:00 2016
@@ -977,6 +977,12 @@ public class SharePointRepository extend
               // The document path includes the library, with no leading slash, and is decoded.
               String decodedItemPathWithoutSite = decodedItemPath.substring(cutoff+1);
               Map<String,String> values = proxy.getFieldValues( metadataDescription.toArray(new
String[0]), encodedSitePath, listID, "/Lists/" + decodedItemPathWithoutSite, dspStsWorks );
+              if (values == null) {
+                if (Logging.connectors.isDebugEnabled())
+                  Logging.connectors.debug("SharePoint: Can't get version of '"+documentIdentifier+"'
because of bad XML characters(?)");
+                activities.deleteDocument(documentIdentifier);
+                continue;
+              }
               String modifiedDate = values.get("Modified");
               String createdDate = values.get("Created");
               String id = values.get("ID");
@@ -1425,6 +1431,13 @@ public class SharePointRepository extend
             int cutoff = decodedLibPath.lastIndexOf("/");
             String decodedDocumentPathWithoutSite = decodedDocumentPath.substring(cutoff);
             Map<String,String> values = proxy.getFieldValues( metadataDescription.toArray(new
String[0]), encodedSitePath, libID, decodedDocumentPathWithoutSite, dspStsWorks );
+            if (values == null)
+            {
+              if (Logging.connectors.isDebugEnabled())
+                Logging.connectors.debug("SharePoint: Can't get version of '"+documentIdentifier+"'
because it has bad characters(?)");
+              activities.deleteDocument(documentIdentifier);
+              continue;
+            }
 
             String modifiedDate = values.get("Modified");
             String createdDate = values.get("Created");



Mime
View raw message