You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Ted Yu (JIRA)" <ji...@apache.org> on 2015/12/03 15:43:11 UTC
[jira] [Resolved] (FLINK-3104) Potential null dereference of
outStream in FsStateBackend#CheckpointStateOutputStream#closeAndGetHandle()
[ https://issues.apache.org/jira/browse/FLINK-3104?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ted Yu resolved FLINK-3104.
---------------------------
Resolution: Not A Problem
> Potential null dereference of outStream in FsStateBackend#CheckpointStateOutputStream#closeAndGetHandle()
> ---------------------------------------------------------------------------------------------------------
>
> Key: FLINK-3104
> URL: https://issues.apache.org/jira/browse/FLINK-3104
> Project: Flink
> Issue Type: Bug
> Reporter: Ted Yu
> Priority: Minor
>
> Here is related code:
> {code}
> if (outStream == null && pos <= localStateThreshold) {
> closed = true;
> byte[] bytes = Arrays.copyOf(writeBuffer, pos);
> return new ByteStreamStateHandle(bytes);
> }
> else {
> flush();
> outStream.close();
> {code}
> The if condition checks both outStream and pos.
> In the else block, outStream may be null, leading to NPE.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)