manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1552750 - in /manifoldcf/branches/CONNECTORS-553/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/email: EmailConnector.java EmailSession.java
Date Fri, 20 Dec 2013 17:26:25 GMT
Author: kwright
Date: Fri Dec 20 17:26:24 2013
New Revision: 1552750

URL: http://svn.apache.org/r1552750
Log:
Fix status check; apparently you can't open the default folder in imap

Modified:
    manifoldcf/branches/CONNECTORS-553/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/email/EmailConnector.java
    manifoldcf/branches/CONNECTORS-553/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/email/EmailSession.java

Modified: manifoldcf/branches/CONNECTORS-553/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/email/EmailConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-553/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/email/EmailConnector.java?rev=1552750&r1=1552749&r2=1552750&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-553/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/email/EmailConnector.java
(original)
+++ manifoldcf/branches/CONNECTORS-553/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/email/EmailConnector.java
Fri Dec 20 17:26:24 2013
@@ -173,11 +173,7 @@ public class EmailConnector extends org.
     finalizeConnection();
     getSession();
     try {
-      Folder defaultFolder = session.openDefaultFolder();
-      if (defaultFolder == null) {
-        throw new ManifoldCFException("Error checking the connection: No default folder.");
-      }
-      session.closeFolder(defaultFolder);
+      session.checkConnection();
     } catch (MessagingException e) {
       handleMessagingException(e,"checking the connection");
     }

Modified: manifoldcf/branches/CONNECTORS-553/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/email/EmailSession.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-553/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/email/EmailSession.java?rev=1552750&r1=1552749&r2=1552750&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-553/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/email/EmailSession.java
(original)
+++ manifoldcf/branches/CONNECTORS-553/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/email/EmailSession.java
Fri Dec 20 17:26:24 2013
@@ -79,16 +79,15 @@ public class EmailSession
     return null;
   }
   
-  public Folder openDefaultFolder()
+  public void checkConnection()
     throws MessagingException
   {
     if (store != null)
     {
-      Folder thisFolder = store.getDefaultFolder();
-      thisFolder.open(Folder.READ_ONLY);
-      return thisFolder;
+      if (store.getDefaultFolder() == null) {
+        throw new MessagingException("Error checking the connection: No default folder.");
+      }
     }
-    return null;
   }
 
   public Folder openFolder(String folderName)



Mime
View raw message