You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tika.apache.org by ta...@apache.org on 2017/06/05 18:23:00 UTC
[tika] branch master updated: TIKA-2384 -- went too far in earlier
commit. We should close the inputstream in parse.
This is an automated email from the ASF dual-hosted git repository.
tallison pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tika.git
The following commit(s) were added to refs/heads/master by this push:
new f74b089 TIKA-2384 -- went too far in earlier commit. We should close the inputstream in parse.
f74b089 is described below
commit f74b089162820b0e80a8217b505164edb1531ef0
Author: tballison <ta...@mitre.org>
AuthorDate: Mon Jun 5 14:22:49 2017 -0400
TIKA-2384 -- went too far in earlier commit. We should close the inputstream in parse.
---
.../src/main/java/org/apache/tika/server/resource/TikaResource.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tika-server/src/main/java/org/apache/tika/server/resource/TikaResource.java b/tika-server/src/main/java/org/apache/tika/server/resource/TikaResource.java
index 10412be..77afed9 100644
--- a/tika-server/src/main/java/org/apache/tika/server/resource/TikaResource.java
+++ b/tika-server/src/main/java/org/apache/tika/server/resource/TikaResource.java
@@ -328,6 +328,8 @@ public class TikaResource {
} catch (Exception e) {
logger.warn("{}: Text extraction failed", path, e);
throw new TikaServerParseException(e);
+ } finally {
+ inputStream.close();
}
}
@@ -371,7 +373,7 @@ public class TikaResource {
return produceTextMain(att.getObject(InputStream.class), att.getHeaders(), info);
}
- public StreamingOutput produceTextMain(final InputStream is, @Context MultivaluedMap<String, String> httpHeaders, @Context final UriInfo info) {
+ public StreamingOutput produceTextMain(final InputStream is, MultivaluedMap<String, String> httpHeaders, final UriInfo info) {
final Parser parser = createParser();
final Metadata metadata = new Metadata();
final ParseContext context = new ParseContext();
--
To stop receiving notification emails like this one, please contact
['"commits@tika.apache.org" <co...@tika.apache.org>'].