showuon commented on a change in pull request #11234:
URL: https://github.com/apache/kafka/pull/11234#discussion_r721153713



##########
File path: 
streams/src/main/java/org/apache/kafka/streams/state/internals/MeteredSessionStore.java
##########
@@ -351,10 +345,8 @@ public V fetchSession(final K key, final long 
earliestSessionEndTime, final long
                                                                  final K keyTo,
                                                                  final long 
earliestSessionEndTime,
                                                                  final long 
latestSessionStartTime) {
-        Objects.requireNonNull(keyFrom, "keyFrom cannot be null");
-        Objects.requireNonNull(keyTo, "keyTo cannot be null");
-        final Bytes bytesKeyFrom = keyBytes(keyFrom);
-        final Bytes bytesKeyTo = keyBytes(keyTo);
+        final Bytes bytesKeyFrom = keyFrom == null ? null : keyBytes(keyFrom);

Review comment:
       Agree! Updated! Thanks.




-- 
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: jira-unsubscr...@kafka.apache.org

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


Reply via email to