manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kam...@apache.org
Subject svn commit: r1791246 - in /manifoldcf/trunk/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/email: EmailConfig.java EmailConnector.java
Date Thu, 13 Apr 2017 13:02:30 GMT
Author: kamaci
Date: Thu Apr 13 13:02:29 2017
New Revision: 1791246

URL: http://svn.apache.org/viewvc?rev=1791246&view=rev
Log:
Improvement for CONNECTORS-1402.

Modified:
    manifoldcf/trunk/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/email/EmailConfig.java
    manifoldcf/trunk/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/email/EmailConnector.java

Modified: manifoldcf/trunk/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/email/EmailConfig.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/email/EmailConfig.java?rev=1791246&r1=1791245&r2=1791246&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/email/EmailConfig.java
(original)
+++ manifoldcf/trunk/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/email/EmailConfig.java
Thu Apr 13 13:02:29 2017
@@ -117,6 +117,7 @@ public class EmailConfig {
   public static final String ENCODING_FIELD = "encoding";
   public static final String MIMETYPE_FIELD = "mimetype";
   public static final String FILENAME_FIELD = "filename";
+  public static final String MAILSUBJECT_FIELD = "mailsubject";
   //public static final String TO = "To";
   
   // Activity names

Modified: manifoldcf/trunk/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/email/EmailConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/email/EmailConnector.java?rev=1791246&r1=1791245&r2=1791246&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/email/EmailConnector.java
(original)
+++ manifoldcf/trunk/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/email/EmailConnector.java
Thu Apr 13 13:02:29 2017
@@ -861,7 +861,8 @@ public class EmailConnector extends org.
                   rd.addField(EmailConfig.EMAIL_FROM, fromStr);
                 } else if (metadata.toLowerCase(Locale.ROOT).equals(EmailConfig.EMAIL_SUBJECT))
{
                   String subject = msg.getSubject();
-                  rd.addField(EmailConfig.EMAIL_SUBJECT, subject);
+                  //Attachments may have a field named "subject". So, different field name
is used not to clash.
+                  rd.addField(EmailConfig.MAILSUBJECT_FIELD, subject);
                 } else if (metadata.toLowerCase(Locale.ROOT).equals(EmailConfig.EMAIL_DATE))
{
                   rd.addField(EmailConfig.EMAIL_DATE, sentDate.toString());
                 }



Mime
View raw message