You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@slider.apache.org by "Gour Saha (JIRA)" <ji...@apache.org> on 2017/09/07 16:00:04 UTC

[jira] [Commented] (SLIDER-1247) Unreleased resource streams

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

Gour Saha commented on SLIDER-1247:
-----------------------------------

Given Slider is compiled with Java 7 by default, using try-with-resources is the best approach here.

> Unreleased resource streams
> ---------------------------
>
>                 Key: SLIDER-1247
>                 URL: https://issues.apache.org/jira/browse/SLIDER-1247
>             Project: Slider
>          Issue Type: Bug
>          Components: agent-provider
>    Affects Versions: Slider 0.92
>            Reporter: Gour Saha
>            Assignee: Gour Saha
>             Fix For: Slider 1.0.0
>
>         Attachments: SLIDER-1247.01.patch
>
>
> The function expandTar() in AgentClientProvider.java will sometimes fail to release a system resource allocated by FileInputStream() and its chain of wrapper streams as shown below -
> {code}
>     TarArchiveInputStream tarIn = new TarArchiveInputStream(
>         new GzipCompressorInputStream(
>             new BufferedInputStream(
>                 new FileInputStream(tarFile)
>             )
>         )
>     );
> {code}
> Similar issues are seen in AgentClientProvider.java in few other places.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)