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/10 11:59:10 UTC

[GitHub] [kafka] chia7712 commented on a change in pull request #10469: KAFKA-12611: Fix using random payload in ProducerPerformance incorrectly

chia7712 commented on a change in pull request #10469:
URL: https://github.com/apache/kafka/pull/10469#discussion_r611035999



##########
File path: tools/src/main/java/org/apache/kafka/tools/ProducerPerformance.java
##########
@@ -111,13 +111,8 @@ public static void main(String[] args) throws Exception {
                 producer.initTransactions();
 
             /* setup perf test */
-            byte[] payload = null;
+            byte[] payload = new byte[recordSize];

Review comment:
       There is a null check for `recordSize` so is it (`new byte[recordSize]`) a potential NPE ?




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