[ https://issues.apache.org/jira/browse/FLINK-7402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16131944#comment-16131944 ]
ASF GitHub Bot commented on FLINK-7402: --------------------------------------- GitHub user zjureel opened a pull request: https://github.com/apache/flink/pull/4562 [FLINK-7402] Fix ineffective null check in NettyMessage#write() ## What is the purpose of the change Fix ineffective null check in NettyMessage#write() ## Brief change log *(for example:)* - *Add null check and remove unnecessary null check* ## Verifying this change *(Please pick either of the following options)* No test case ## Does this pull request potentially affect one of the following parts: - Dependencies (does it add or upgrade a dependency): (no) - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (no) - The serializers: (no) - The runtime per-record code paths (performance sensitive): (no) - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (no) ## Documentation - Does this pull request introduce a new feature? (no) - If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented) You can merge this pull request into a Git repository by running: $ git pull https://github.com/zjureel/flink FLINK-7402 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/4562.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #4562 ---- commit e289b37cf8adce56876b47ee33ed161058bf64e6 Author: zjureel <zjur...@gmail.com> Date: 2017-08-18T06:43:34Z [FLINK-7402] Fix ineffective null check in NettyMessage#write() ---- > Ineffective null check in NettyMessage#write() > ---------------------------------------------- > > Key: FLINK-7402 > URL: https://issues.apache.org/jira/browse/FLINK-7402 > Project: Flink > Issue Type: Bug > Reporter: Ted Yu > Priority: Minor > > Here is the null check in finally block: > {code} > finally { > if (buffer != null) { > buffer.recycle(); > } > {code} > But buffer has been dereferenced in the try block without guard. -- This message was sent by Atlassian JIRA (v6.4.14#64029)