bbejeck commented on code in PR #23144:
URL: https://github.com/apache/kafka/pull/23144#discussion_r3771453779


##########
streams/src/main/java/org/apache/kafka/streams/state/internals/RocksDBStore.java:
##########
@@ -512,10 +512,17 @@ public synchronized byte[] putIfAbsent(final Bytes key,
 
     @Override
     public void putAll(final List<KeyValue<Bytes, byte[]>> entries) {
+        Objects.requireNonNull(entries, "entries cannot be null");
+        // Validate up front so a null key rejects the whole batch. An 
accessor may apply the entries
+        // one at a time, and failing part-way through would otherwise leave 
the batch half-applied.
+        for (final KeyValue<Bytes, byte[]> entry : entries) {
+            Objects.requireNonNull(entry, "entry cannot be null");
+            Objects.requireNonNull(entry.key, "key cannot be null");
+        }
+        validateStoreOpen();

Review Comment:
   You mean the `Objects.requirewNonNull`? Just being conservative can remove



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to