You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by kk...@apache.org on 2020/03/21 00:08:11 UTC

[kafka] branch 2.4 updated: MINOR: Use Exit.exit instead of System.exit in MM2 (#8321)

This is an automated email from the ASF dual-hosted git repository.

kkarantasis pushed a commit to branch 2.4
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/2.4 by this push:
     new e241e7c  MINOR: Use Exit.exit instead of System.exit in MM2 (#8321)
e241e7c is described below

commit e241e7c5dac4b427ab343b61602973e306394f62
Author: Konstantine Karantasis <ko...@confluent.io>
AuthorDate: Fri Mar 20 16:39:17 2020 -0700

    MINOR: Use Exit.exit instead of System.exit in MM2 (#8321)
    
    Exit.exit needs to be used in code instead of System.exit.
    
    Particularly in integration tests using System.exit is disrupting because it exits the jvm process and does not just fail the test correctly. Integration tests override procedures in Exit to protect against such cases.
    
    Reviewers: Ryanne Dolan <ry...@gmail.com>, Ismael Juma <is...@juma.me.uk>, Randall Hauch <rh...@gmail.com>
---
 .../src/main/java/org/apache/kafka/connect/mirror/MirrorMaker.java      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/connect/mirror/src/main/java/org/apache/kafka/connect/mirror/MirrorMaker.java b/connect/mirror/src/main/java/org/apache/kafka/connect/mirror/MirrorMaker.java
index d635b1c..5ba6890 100644
--- a/connect/mirror/src/main/java/org/apache/kafka/connect/mirror/MirrorMaker.java
+++ b/connect/mirror/src/main/java/org/apache/kafka/connect/mirror/MirrorMaker.java
@@ -278,7 +278,7 @@ public class MirrorMaker {
             ns = parser.parseArgs(args);
         } catch (ArgumentParserException e) {
             parser.handleError(e);
-            System.exit(-1);
+            Exit.exit(-1);
             return;
         }
         File configFile = (File) ns.get("config");