[jira] [Updated] (CARBONDATA-2330) DataInputStream should be closed in finally block in SegmentIndexFileStore#readIndexFile

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

[jira] [Updated] (CARBONDATA-2330) DataInputStream should be closed in finally block in SegmentIndexFileStore#readIndexFile

Akash R Nilugal (Jira)

     [ https://issues.apache.org/jira/browse/CARBONDATA-2330?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ted Yu updated CARBONDATA-2330:
-------------------------------
    Description:
{code}
    DataInputStream dataInputStream =
        FileFactory.getDataInputStream(indexFilePath, FileFactory.getFileType(indexFilePath));
    byte[] bytes = new byte[(int) indexFile.getSize()];
    dataInputStream.readFully(bytes);
...
    dataInputStream.close();
{code}

The close call should be placed inside finally block.

  was:
{code}
    DataInputStream dataInputStream =
        FileFactory.getDataInputStream(indexFilePath, FileFactory.getFileType(indexFilePath));
    byte[] bytes = new byte[(int) indexFile.getSize()];
    dataInputStream.readFully(bytes);
...
    dataInputStream.close();
{code}
The close call should be placed inside finally block.


> DataInputStream should be closed in finally block in SegmentIndexFileStore#readIndexFile
> ----------------------------------------------------------------------------------------
>
>                 Key: CARBONDATA-2330
>                 URL: https://issues.apache.org/jira/browse/CARBONDATA-2330
>             Project: CarbonData
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Priority: Minor
>
> {code}
>     DataInputStream dataInputStream =
>         FileFactory.getDataInputStream(indexFilePath, FileFactory.getFileType(indexFilePath));
>     byte[] bytes = new byte[(int) indexFile.getSize()];
>     dataInputStream.readFully(bytes);
> ...
>     dataInputStream.close();
> {code}
> The close call should be placed inside finally block.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)