You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/04/22 08:54:07 UTC

[GitHub] [kafka] cadonna commented on pull request #10548: KAFKA-12396 added a nullcheck before trying to retrieve a key

cadonna commented on pull request #10548:
URL: https://github.com/apache/kafka/pull/10548#issuecomment-824665014


   >
   >     * prefixScan() (prefix should not be `null` either I guess? \cc @guozhangwang @cadonna
   > 
   
   Yes! Actually, the implementations in `RocksDBStore` and `InMemoryKeyValueStore` already have a `null` check. 
   
   ```
      public <PS extends Serializer<P>, P> KeyValueIterator<Bytes, byte[]> prefixScan(final P prefix,
                                                                                       final PS prefixKeySerializer) {
           Objects.requireNonNull(prefix, "prefix cannot be null");
           Objects.requireNonNull(prefixKeySerializer, "prefixKeySerializer cannot be null");
   ```
   
   I think it would make sense to move them to the `MeteredKeyValueStore`.


-- 
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:
users@infra.apache.org