You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by tr...@apache.org on 2018/07/22 13:12:44 UTC

flink git commit: [FLINK-9185] [runtime] Fix potential null dereference in PrioritizedOperatorSubtaskState#resolvePrioritizedAlternatives

Repository: flink
Updated Branches:
  refs/heads/master f60aa6e72 -> c6b39e4f2


[FLINK-9185] [runtime] Fix potential null dereference in PrioritizedOperatorSubtaskState#resolvePrioritizedAlternatives

This closes #5894.


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/c6b39e4f
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/c6b39e4f
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/c6b39e4f

Branch: refs/heads/master
Commit: c6b39e4f2af4f5cdcc6efc126f78d01d3237e2d9
Parents: f60aa6e
Author: Stephen Jason <st...@gmail.com>
Authored: Sat Apr 21 11:19:26 2018 +0000
Committer: Till Rohrmann <tr...@apache.org>
Committed: Sun Jul 22 15:11:35 2018 +0200

----------------------------------------------------------------------
 .../flink/runtime/checkpoint/PrioritizedOperatorSubtaskState.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/c6b39e4f/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/PrioritizedOperatorSubtaskState.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/PrioritizedOperatorSubtaskState.java b/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/PrioritizedOperatorSubtaskState.java
index 512f912..52b30a1 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/PrioritizedOperatorSubtaskState.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/PrioritizedOperatorSubtaskState.java
@@ -18,6 +18,7 @@
 
 package org.apache.flink.runtime.checkpoint;
 
+import org.apache.commons.lang3.BooleanUtils;
 import org.apache.flink.annotation.Internal;
 import org.apache.flink.runtime.state.KeyedStateHandle;
 import org.apache.flink.runtime.state.OperatorStateHandle;
@@ -282,7 +283,7 @@ public class PrioritizedOperatorSubtaskState {
 				if (alternative != null
 					&& alternative.hasState()
 					&& alternative.size() == 1
-					&& approveFun.apply(reference, alternative.iterator().next())) {
+					&& BooleanUtils.isTrue(approveFun.apply(reference, alternative.iterator().next()))) {
 
 					approved.add(alternative);
 				}