You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2020/09/02 18:00:01 UTC

[jira] [Commented] (NIFI-7167) IdentifyMimeType TikaInputStream not closed

    [ https://issues.apache.org/jira/browse/NIFI-7167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17189604#comment-17189604 ] 

ASF subversion and git services commented on NIFI-7167:
-------------------------------------------------------

Commit 353a91beb8de5a903c6b01f43bbc0d6e1ca651ae in nifi's branch refs/heads/support/nifi-1.12.x from Cameron E. Tidd
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=353a91b ]

NIFI-7167 Fixing resource leaks in IdentifyMimeType

The TikaInputStream and FileInputStream instances utilized in IdentifyMimeType are now explicitly closed. The FileInputStream is additionally wrapped by a BufferedInputStream.


> IdentifyMimeType TikaInputStream not closed
> -------------------------------------------
>
>                 Key: NIFI-7167
>                 URL: https://issues.apache.org/jira/browse/NIFI-7167
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Extensions
>    Affects Versions: 1.11.1
>            Reporter: Richie Howell
>            Assignee: Cameron Tidd
>            Priority: Minor
>             Fix For: 1.13.0, 1.12.1
>
>         Attachments: image-2020-02-18-15-53-10-699.png
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> On line 216 of the IdentifyMineType processor a TikaInputStream is opened but never closed. 
>  
> From the looks of it, this stream should be closed with the close() method, or use try-with-resources.
> [https://tika.apache.org/1.8/api/org/apache/tika/io/TikaInputStream.html#get(java.io.InputStream,%20org.apache.tika.io.TemporaryResources)]
> !image-2020-02-18-15-53-10-699.png!



--
This message was sent by Atlassian Jira
(v8.3.4#803005)