Repository: tika Updated Branches: refs/heads/2.x cde4c0aa8 -> b84fcc584
TIKA-2101 -- don't call MAPIMessage's close() Project: http://git-wip-us.apache.org/repos/asf/tika/repo Commit: http://git-wip-us.apache.org/repos/asf/tika/commit/b84fcc58 Tree: http://git-wip-us.apache.org/repos/asf/tika/tree/b84fcc58 Diff: http://git-wip-us.apache.org/repos/asf/tika/diff/b84fcc58 Branch: refs/heads/2.x Commit: b84fcc5842c10af3c41181eae01a127ef438eb88 Parents: cde4c0a Author: tballison <[email protected]> Authored: Wed Sep 28 13:40:21 2016 -0400 Committer: tballison <[email protected]> Committed: Wed Sep 28 13:40:21 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/b84fcc58/tika-parser-modules/tika-parser-office-module/src/main/java/org/apache/tika/parser/microsoft/OutlookExtractor.java ---------------------------------------------------------------------- diff --git a/tika-parser-modules/tika-parser-office-module/src/main/java/org/apache/tika/parser/microsoft/OutlookExtractor.java b/tika-parser-modules/tika-parser-office-module/src/main/java/org/apache/tika/parser/microsoft/OutlookExtractor.java index 74a95e7..d8d26aa 100644 --- a/tika-parser-modules/tika-parser-office-module/src/main/java/org/apache/tika/parser/microsoft/OutlookExtractor.java +++ b/tika-parser-modules/tika-parser-office-module/src/main/java/org/apache/tika/parser/microsoft/OutlookExtractor.java @@ -261,13 +261,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 } }
