summaryrefslogtreecommitdiffstats
path: root/zookeeper-command-line-client
diff options
context:
space:
mode:
authorHarald Musum <musum@yahooinc.com>2022-04-25 15:00:08 +0200
committerHarald Musum <musum@yahooinc.com>2022-04-25 15:00:08 +0200
commitd40e95da8f909a5f860cd0e0ec5a3e94cdc50532 (patch)
tree31489f8f153623578fdbe93f014e698d914c71e0 /zookeeper-command-line-client
parentad0f821291c71be9c077c98c0edece14ccb8fb4d (diff)
Avoid logging error when client exits
Need to change compiler warnings to avoid issue with edu.umd.cs.findbugs.annotations.SuppressFBWarnings that leads to compiler warning
Diffstat (limited to 'zookeeper-command-line-client')
-rw-r--r--zookeeper-command-line-client/pom.xml9
-rw-r--r--zookeeper-command-line-client/src/main/java/com/yahoo/vespa/zookeeper/cli/Main.java3
2 files changed, 11 insertions, 1 deletions
diff --git a/zookeeper-command-line-client/pom.xml b/zookeeper-command-line-client/pom.xml
index 236bd5245a9..5e2318314d9 100644
--- a/zookeeper-command-line-client/pom.xml
+++ b/zookeeper-command-line-client/pom.xml
@@ -71,6 +71,15 @@
<build>
<plugins>
<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <compilerArgs>
+ <arg>-Xlint:all</arg>
+ </compilerArgs>
+ </configuration>
+ </plugin>
+ <plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
diff --git a/zookeeper-command-line-client/src/main/java/com/yahoo/vespa/zookeeper/cli/Main.java b/zookeeper-command-line-client/src/main/java/com/yahoo/vespa/zookeeper/cli/Main.java
index 7f7965f82eb..e10404cf2c7 100644
--- a/zookeeper-command-line-client/src/main/java/com/yahoo/vespa/zookeeper/cli/Main.java
+++ b/zookeeper-command-line-client/src/main/java/com/yahoo/vespa/zookeeper/cli/Main.java
@@ -3,8 +3,8 @@ package com.yahoo.vespa.zookeeper.cli;
import com.yahoo.vespa.zookeeper.client.ZkClientConfigBuilder;
import org.apache.zookeeper.ZooKeeperMain;
+import org.apache.zookeeper.util.ServiceUtils;
import org.slf4j.impl.SimpleLogger;
-
import java.io.IOException;
/**
@@ -20,6 +20,7 @@ public class Main {
new ZkClientConfigBuilder()
.toConfigProperties()
.forEach(System::setProperty);
+ ServiceUtils.setSystemExitProcedure(System::exit);
ZooKeeperMain.main(args);
}
}