Skip to content

Commit

Permalink
fix for TIKA-3001 contributed by tandara0 (apache#298)
Browse files Browse the repository at this point in the history
  • Loading branch information
tandara0 authored and tballison committed Nov 26, 2019
1 parent abf8a5c commit 8474175
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
import org.apache.tika.exception.EncryptedDocumentException;
import org.apache.tika.exception.TikaException;
import org.apache.tika.exception.UnsupportedFormatException;
import org.apache.tika.io.CloseShieldInputStream;
import org.apache.tika.metadata.Metadata;
import org.apache.tika.metadata.Office;
import org.apache.tika.metadata.OfficeOpenXMLCore;
Expand Down Expand Up @@ -100,7 +101,7 @@ public void extract(InputStream source, Metadata metadata, XHTMLContentHandler x

POIFSFileSystem fs = null;
try {
fs = new POIFSFileSystem(source);
fs = new POIFSFileSystem(new CloseShieldInputStream(source));

DirectoryNode root = fs.getRoot();
extract0(root, metadata, xhtml);
Expand Down

0 comments on commit 8474175

Please sign in to comment.