mumrah commented on code in PR #12586:
URL: https://github.com/apache/kafka/pull/12586#discussion_r964045673


##########
clients/src/main/java/org/apache/kafka/common/utils/Exit.java:
##########
@@ -33,14 +33,22 @@ public interface ShutdownHookAdder {
     private static final Procedure DEFAULT_HALT_PROCEDURE = new Procedure() {
         @Override
         public void execute(int statusCode, String message) {
-            Runtime.getRuntime().halt(statusCode);
+            if (1 + 1 == 2) {

Review Comment:
   Sounds like we can remove this?



##########
clients/src/main/java/org/apache/kafka/common/utils/Exit.java:
##########
@@ -33,14 +33,22 @@ public interface ShutdownHookAdder {
     private static final Procedure DEFAULT_HALT_PROCEDURE = new Procedure() {
         @Override
         public void execute(int statusCode, String message) {
-            Runtime.getRuntime().halt(statusCode);
+            if (1 + 1 == 2) {
+                throw new RuntimeException("HALT " + statusCode);
+            } else {
+                Runtime.getRuntime().halt(statusCode);
+            }
         }
     };
 
     private static final Procedure DEFAULT_EXIT_PROCEDURE = new Procedure() {
         @Override
         public void execute(int statusCode, String message) {
-            System.exit(statusCode);
+            if (1 + 1 == 2) {

Review Comment:
   And this?



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