You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by "Ted Yu (JIRA)" <ji...@apache.org> on 2015/12/02 23:12:11 UTC
[jira] [Created] (FLINK-3104) Potential null dereference of
outStream in FsStateBackend#CheckpointStateOutputStream#closeAndGetHandle()
Ted Yu created FLINK-3104:
-----------------------------
Summary: 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)