You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by tillrohrmann <gi...@git.apache.org> on 2018/07/18 12:59:40 UTC
[GitHub] flink pull request #5894: [FLINK-9185] [runtime] Fix potential null derefere...
Github user tillrohrmann commented on a diff in the pull request:
https://github.com/apache/flink/pull/5894#discussion_r203368063
--- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/PrioritizedOperatorSubtaskState.java ---
@@ -281,10 +281,15 @@ public PrioritizedOperatorSubtaskState build() {
// approve-function signaled true.
if (alternative != null
&& alternative.hasState()
- && alternative.size() == 1
- && approveFun.apply(reference, alternative.iterator().next())) {
--- End diff --
Could we wrap this application in `BooleanUtils.isTrue(approveFun.apply(reference, alternative.iterator().next()))` in order to avoid the extra conditions?
---