Myasuka commented on a change in pull request #18391:
URL: https://github.com/apache/flink/pull/18391#discussion_r803767353



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/metadata/MetadataV2V3SerializerBase.java
##########
@@ -415,7 +440,7 @@ KeyedStateHandle deserializeKeyedStateHandle(
             int baseSize = dis.readInt();
             List<KeyedStateHandle> base = new ArrayList<>(baseSize);
             for (int i = 0; i < baseSize; i++) {
-                base.add(deserializeKeyedStateHandle(dis, context));
+                
base.add(Preconditions.checkNotNull(deserializeKeyedStateHandle(dis, context)));

Review comment:
       Since we already write the size of collection out, it's really strange 
that the materialized collection having `null` as its elements. I think a check 
here could act as a safety guard here.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to