SteNicholas commented on a change in pull request #12033:
URL: https://github.com/apache/flink/pull/12033#discussion_r422436572



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/state/heap/HeapMapState.java
##########
@@ -158,7 +159,7 @@ public boolean contains(UK userKey) {
        @Override
        public Iterator<Map.Entry<UK, UV>> iterator() {
                Map<UK, UV> userMap = stateTable.get(currentNamespace);
-               return userMap == null ? null : userMap.entrySet().iterator();
+               return userMap == null ? Collections.<UK, 
UV>emptyMap().entrySet().iterator() : userMap.entrySet().iterator();

Review comment:
       @Myasuka Yeah, I would like to modify `NullAwareMapIterator` to solve 
the `NullException` and add unit test to cover `null` behavior case.




----------------------------------------------------------------
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.

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


Reply via email to