[jira] [Created] (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] [Created] (CARBONDATA-2330) DataInputStream should be closed in finally block in SegmentIndexFileStore#readIndexFile

Akash R Nilugal (Jira)
Ted Yu created CARBONDATA-2330:
----------------------------------

             Summary: 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


{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)