Pankraz76 commented on code in PR #21161:
URL: https://github.com/apache/kafka/pull/21161#discussion_r2628487286


##########
tools/src/main/java/org/apache/kafka/tools/TransactionalMessageCopier.java:
##########
@@ -402,7 +414,7 @@ public void onPartitionsAssigned(Collection<TopicPartition> 
partitions) {
                     } catch (KafkaException e) {
                         log.debug("Aborting transaction after catching 
exception", e);
                         abortTransactionAndResetPosition(producer, consumer);
-                    }
+                    } 

Review Comment:
   - 
https://github.com/junit-team/junit-framework/blob/575f741c2c73dd4242b29b8d4642fda9dfdd8cce/gradle/plugins/common/src/main/kotlin/junitbuild.spotless-conventions.gradle.kts#L39
   - https://docs.openrewrite.org/recipes/java/format/removetrailingwhitespace
   - https://github.com/apache/kafka/pull/21168
   
   kindly related example to improve setup, streamline development convention.
   
   
   ```suggestion
                       }
   ```



##########
tools/src/main/java/org/apache/kafka/tools/TransactionalMessageCopier.java:
##########
@@ -308,9 +308,11 @@ public static void runEventLoop(Namespace parsedArgs) {
 
         String consumerGroup = parsedArgs.getString("consumerGroup");
 
-        final KafkaProducer<String, String> producer = 
createProducer(parsedArgs);
+        KafkaProducer<String, String> producer = createProducer(parsedArgs);
         final KafkaConsumer<String, String> consumer = 
createConsumer(parsedArgs);
 
+        int producerNumber = 0;

Review Comment:
   ```suggestion
           int producerNumber;
   ```
   imho, its kind of the same right? idk which is the default, but again just 
offtopic im sorry.
   
   This could be streamlined as well by: 
   
   https://docs.openrewrite.org/recipes/staticanalysis/commonstaticanalysis



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