[camel] branch master updated: Close inputStream

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[camel] branch master updated: Close inputStream

acosentino
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new 862d3a6  Close inputStream
862d3a6 is described below

commit 862d3a6cb26d21b91cdda5f36cf4dff987b7b88f
Author: elbaz michael <[hidden email]>
AuthorDate: Fri Oct 16 18:52:28 2020 +0200

    Close inputStream
   
    https://tika.apache.org/0.5/documentation.html
---
 .../src/main/java/org/apache/camel/component/tika/TikaProducer.java      | 1 +
 1 file changed, 1 insertion(+)

diff --git a/components/camel-tika/src/main/java/org/apache/camel/component/tika/TikaProducer.java b/components/camel-tika/src/main/java/org/apache/camel/component/tika/TikaProducer.java
index a5d1906..eab34bd 100644
--- a/components/camel-tika/src/main/java/org/apache/camel/component/tika/TikaProducer.java
+++ b/components/camel-tika/src/main/java/org/apache/camel/component/tika/TikaProducer.java
@@ -100,6 +100,7 @@ public class TikaProducer extends DefaultProducer {
         Metadata metadata = new Metadata();
         MediaType result = this.detector.detect(inputStream, metadata);
         convertMetadataToHeaders(metadata, exchange);
+        inputStream.close();
         return result.toString();
     }