You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Stephan Ewen (JIRA)" <ji...@apache.org> on 2015/10/21 19:35:27 UTC

[jira] [Commented] (FLINK-2866) Potential resource leak due to unclosed ObjectInputStream in FileSerializableStateHandle

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

Stephan Ewen commented on FLINK-2866:
-------------------------------------

Thanks for spotting this, this should be fixed...

> Potential resource leak due to unclosed ObjectInputStream in FileSerializableStateHandle
> ----------------------------------------------------------------------------------------
>
>                 Key: FLINK-2866
>                 URL: https://issues.apache.org/jira/browse/FLINK-2866
>             Project: Flink
>          Issue Type: Bug
>            Reporter: Ted Yu
>
> Here is related code:
> {code}
>   public T getState(ClassLoader classLoader) throws Exception {
>     FSDataInputStream inStream = getFileSystem().open(getFilePath());
>     ObjectInputStream ois = new InstantiationUtil.ClassLoaderObjectInputStream(inStream, classLoader);
>     return (T) ois.readObject();
> {code}
> ObjectInputStream should be closed upon exit from the method



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