gora-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GORA-460) InputStream is not closed in DataStoreFactory#getMappingFile()
Date Mon, 25 Jan 2016 17:50:39 GMT

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

Ted Yu commented on GORA-460:
-----------------------------

Can this be merged ?

> InputStream is not closed in DataStoreFactory#getMappingFile()
> --------------------------------------------------------------
>
>                 Key: GORA-460
>                 URL: https://issues.apache.org/jira/browse/GORA-460
>             Project: Apache Gora
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Priority: Minor
>
> Here is related code:
> {code}
>     InputStream mappingFile = store.getClass().getClassLoader().getResourceAsStream(mappingFilename);
>     if (mappingFile == null)
>       throw new IOException("Unable to open mapping file: "+mappingFilename);
>     return mappingFilename;
> {code}
> mappingFile should be closed before returning.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message