Author: kwright
Date: Fri Jun 29 10:38:50 2018
New Revision: 1834665
URL: http://svn.apache.org/viewvc?rev=1834665&view=rev
Log:
Fix for CONNECTORS-1512.
Modified:
manifoldcf/trunk/CHANGES.txt
manifoldcf/trunk/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/DCTM/DCTM.java
manifoldcf/trunk/connectors/documentum/implementation/src/main/java/org/apache/manifoldcf/crawler/common/DCTM/DocumentumImpl.java
Modified: manifoldcf/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/manifoldcf/trunk/CHANGES.txt?rev=1834665&r1=1834664&r2=1834665&view=diff
==============================================================================
--- manifoldcf/trunk/CHANGES.txt (original)
+++ manifoldcf/trunk/CHANGES.txt Fri Jun 29 10:38:50 2018
@@ -3,6 +3,10 @@ $Id$
======================= 2.11-dev =====================
+CONNECTORS-1512: Fix NPE in documentum connector when a document
+is removed from the Documentum repository (not deleted, completely
+removed).
+
CONNECTORS-1510: Fix NPE in solr connector with null mime type.
CONNECTORS-1507: Restarting the cluster could leave documents
Modified:
manifoldcf/trunk/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/DCTM/DCTM.java
URL:
http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/DCTM/DCTM.java?rev=1834665&r1=1834664&r2=1834665&view=diff
==============================================================================
---
manifoldcf/trunk/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/DCTM/DCTM.java
(original)
+++
manifoldcf/trunk/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/DCTM/DCTM.java
Fri Jun 29 10:38:50 2018
@@ -1396,12 +1396,12 @@ public class DCTM extends org.apache.man
"' and any r_version_label='CURRENT'");
try
{
- long contentSizeValue = object.getContentSize();
+ long contentSizeValue = (object==null)?0L:object.getContentSize();
contentSize = new Long(contentSizeValue);
// Get the type name; this is what we use to figure out the desired
attributes
- String typeName = object.getTypeName();
+ String typeName = (object==null)?null:object.getTypeName();
- if (object.exists() && !object.isDeleted() && !object.isHidden() &&
object.getPermit() > 1 &&
+ if (object != null && object.exists() && !object.isDeleted() &&
!object.isHidden() && object.getPermit() > 1 &&
contentSizeValue > 0 && object.getPageCount() > 0)
{
// According to Ryck, the version label is not helping us much, so
if it's null it's ok
@@ -1463,7 +1463,11 @@ public class DCTM extends org.apache.man
}
// Do fetch phase
-
+ if (object == null) {
+ activityStatus = "MISSING";
+ return;
+ }
+
String objName = object.getObjectName();
String contentType = object.getContentType();
Modified:
manifoldcf/trunk/connectors/documentum/implementation/src/main/java/org/apache/manifoldcf/crawler/common/DCTM/DocumentumImpl.java
URL:
http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/documentum/implementation/src/main/java/org/apache/manifoldcf/crawler/common/DCTM/DocumentumImpl.java?rev=1834665&r1=1834664&r2=1834665&view=diff
==============================================================================
---
manifoldcf/trunk/connectors/documentum/implementation/src/main/java/org/apache/manifoldcf/crawler/common/DCTM/DocumentumImpl.java
(original)
+++
manifoldcf/trunk/connectors/documentum/implementation/src/main/java/org/apache/manifoldcf/crawler/common/DCTM/DocumentumImpl.java
Fri Jun 29 10:38:50 2018
@@ -331,7 +331,11 @@ public class DocumentumImpl extends Unic
IDfSession objIDfSession = getSession();
try
{
- return new
DocumentumObjectImpl(objIDfSession,objIDfSession.getObjectByQualification(dql));
+ IDfPersistentObject o = objIDfSession.getObjectByQualification(dql);
+ if (o == null) {
+ return null;
+ }
+ return new DocumentumObjectImpl(objIDfSession,o);
}
catch (DfAuthenticationException ex)
{