manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1491720 - /manifoldcf/trunk/connectors/alfresco/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/alfresco/PropertiesUtils.java
Date Tue, 11 Jun 2013 09:52:57 GMT
Author: kwright
Date: Tue Jun 11 09:52:57 2013
New Revision: 1491720

URL: http://svn.apache.org/r1491720
Log:
Fix ArrayIndexOutOfBounds problem with alfresco connector; no ticket because Jira is down.

Modified:
    manifoldcf/trunk/connectors/alfresco/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/alfresco/PropertiesUtils.java

Modified: manifoldcf/trunk/connectors/alfresco/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/alfresco/PropertiesUtils.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/alfresco/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/alfresco/PropertiesUtils.java?rev=1491720&r1=1491719&r2=1491720&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/alfresco/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/alfresco/PropertiesUtils.java
(original)
+++ manifoldcf/trunk/connectors/alfresco/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/alfresco/PropertiesUtils.java
Tue Jun 11 09:52:57 2013
@@ -174,8 +174,11 @@ public class PropertiesUtils {
         if(Constants.PROP_CONTENT.equals(contentProperty.getName())){
           String defaultContentPropertyValue = contentProperty.getValue();
           String[] contentSplitted = StringUtils.split(defaultContentPropertyValue, PROP_CONTENT_SEP);
-          String[] mimeTypeSplitted = StringUtils.split(contentSplitted[1], PROP_MIMETYPE_SEP);
-          return mimeTypeSplitted[1];
+          if (contentSplitted.length > 1) {
+            String[] mimeTypeSplitted = StringUtils.split(contentSplitted[1], PROP_MIMETYPE_SEP);
+            return mimeTypeSplitted[1];
+          }
+          return contentSplitted[0];
         }
       }
     }



Mime
View raw message