mjsax commented on a change in pull request #10548:
URL: https://github.com/apache/kafka/pull/10548#discussion_r617136596



##########
File path: 
streams/src/main/java/org/apache/kafka/streams/state/internals/MeteredTimestampedKeyValueStore.java
##########
@@ -73,6 +76,7 @@
     public boolean putIfDifferentValues(final K key,
                                         final ValueAndTimestamp<V> newValue,
                                         final byte[] oldSerializedValue) {
+        Objects.requireNonNull(key, "key cannot be null");

Review comment:
       Actually not public API -- don't need this check.

##########
File path: 
streams/src/main/java/org/apache/kafka/streams/state/internals/MeteredTimestampedKeyValueStore.java
##########
@@ -59,6 +61,7 @@
 
 
     public RawAndDeserializedValue<V> getWithBinary(final K key) {
+        Objects.requireNonNull(key, "key cannot be null");

Review comment:
       Actually not public API -- don't need this check.

##########
File path: 
streams/src/main/java/org/apache/kafka/streams/state/internals/RocksDBStore.java
##########
@@ -326,6 +326,7 @@ public void putAll(final List<KeyValue<Bytes, byte[]>> 
entries) {
 
     @Override
     public synchronized byte[] get(final Bytes key) {
+        Objects.requireNonNull(key, "key cannot be null");

Review comment:
       This check can be remove, as we do the check in the "metered" store that 
will wrap this one.

##########
File path: 
streams/src/main/java/org/apache/kafka/streams/state/internals/MeteredKeyValueStore.java
##########
@@ -290,6 +295,7 @@ protected V outerValue(final byte[] value) {
     }
 
     protected Bytes keyBytes(final K key) {
+        Objects.requireNonNull(key, "key cannot be null");

Review comment:
       This method is not `public` so no need to add this check




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