gora-dev mailing list archives

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

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

ASF GitHub Bot commented on GORA-460:
-------------------------------------

Github user lewismc commented on the pull request:

    https://github.com/apache/gora/pull/52#issuecomment-172417164
  
    +1
    
    On Sunday, January 17, 2016, Renato Marroquin <notifications@github.com>
    wrote:
    
    > Closing properties file before returning the file name.
    > ------------------------------
    > You can view, comment on, or merge this pull request online at:
    >
    >   https://github.com/apache/gora/pull/52
    > Commit Summary
    >
    >    - GORA-460
    >
    > File Changes
    >
    >    - *M*
    >    gora-core/src/main/java/org/apache/gora/store/DataStoreFactory.java
    >    <https://github.com/apache/gora/pull/52/files#diff-0> (1)
    >
    > Patch Links:
    >
    >    - https://github.com/apache/gora/pull/52.patch
    >    - https://github.com/apache/gora/pull/52.diff
    >
    > —
    > Reply to this email directly or view it on GitHub
    > <https://github.com/apache/gora/pull/52>.
    >
    
    
    -- 
    *Lewis*



> 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