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



##########
File path: 
streams/src/main/java/org/apache/kafka/streams/state/internals/MeteredKeyValueStore.java
##########
@@ -234,13 +247,15 @@ public V delete(final K key) {
 
     @Override
     public <PS extends Serializer<P>, P> KeyValueIterator<K, V> 
prefixScan(final P prefix, final PS prefixKeySerializer) {
-
+        Objects.requireNonNull(prefix, "key cannot be null");

Review comment:
       
   
![image](https://user-images.githubusercontent.com/44339288/115794170-3441fa00-a3d6-11eb-8fd6-ba9a90af3005.png)
   I wrote a quick test to see if it still throws NPE in 
`InMemoryKeyValueStore` without the check - it did, I am confused, but they 
are, indeed, redundant.
   I'll leave the tests in both `RocksDBStoreTest` and `InMemoryKeyValueStore` 
bc why not.




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