You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by "Ted Yu (JIRA)" <ji...@apache.org> on 2018/04/20 16:47:00 UTC
[jira] [Updated] (CARBONDATA-2330) DataInputStream should be closed
in finally block in SegmentIndexFileStore#readIndexFile
[ 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)