flink-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Created] (FLINK-3104) Potential null dereference of outStream in FsStateBackend#CheckpointStateOutputStream#closeAndGetHandle()
Date Wed, 02 Dec 2015 22:12:11 GMT
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)

Mime
View raw message