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/20 23:59:18 UTC

[kafka] branch 2.5 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.5
in repository https://gitbox.apache.org/repos/asf/kafka.git


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

commit 3b2a717b2ca52bf9661de8dc23ec639c502336c4
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 07ad4fd..497e691 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");