Repository: tika
Updated Branches:
  refs/heads/master 9b497d1fe -> feac58b6f


TIKA-2101 -- Don't call MAPIMessage.close()


Project: http://git-wip-us.apache.org/repos/asf/tika/repo
Commit: http://git-wip-us.apache.org/repos/asf/tika/commit/feac58b6
Tree: http://git-wip-us.apache.org/repos/asf/tika/tree/feac58b6
Diff: http://git-wip-us.apache.org/repos/asf/tika/diff/feac58b6

Branch: refs/heads/master
Commit: feac58b6f74156086113bf08bbfe9feda1c14b79
Parents: 9b497d1
Author: tballison <[email protected]>
Authored: Wed Sep 28 13:38:02 2016 -0400
Committer: tballison <[email protected]>
Committed: Wed Sep 28 13:38:02 2016 -0400

----------------------------------------------------------------------
 .../apache/tika/parser/microsoft/OutlookExtractor.java | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tika/blob/feac58b6/tika-parsers/src/main/java/org/apache/tika/parser/microsoft/OutlookExtractor.java
----------------------------------------------------------------------
diff --git 
a/tika-parsers/src/main/java/org/apache/tika/parser/microsoft/OutlookExtractor.java
 
b/tika-parsers/src/main/java/org/apache/tika/parser/microsoft/OutlookExtractor.java
index c40a3f4..c1db274 100644
--- 
a/tika-parsers/src/main/java/org/apache/tika/parser/microsoft/OutlookExtractor.java
+++ 
b/tika-parsers/src/main/java/org/apache/tika/parser/microsoft/OutlookExtractor.java
@@ -255,13 +255,12 @@ public class OutlookExtractor extends 
AbstractPOIFSExtractor {
         } catch (ChunkNotFoundException e) {
             throw new TikaException("POI MAPIMessage broken - didn't return 
null on missing chunk", e);
         } finally {
-            if (msg != null) {
-                try {
-                    msg.close();
-                } catch (IOException e) {
-                    //swallow
-                }
-            }
+            //You'd think you'd want to call msg.close().
+            //Don't do that.  That closes down the file system.
+            //If an msg has multiple msg attachments, some of them
+            //can reside in the same file system.  After the first
+            //child is read, the fs is closed, and the other children
+            //get a java.nio.channels.ClosedChannelException
         }
     }
 

Reply via email to