Skip to content

Commit 0e5ee07

Browse files
committed
Enable DM_EXIT spotbugs rule for the full code base
1 parent b05a4bf commit 0e5ee07

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

excludeFindBugsFilter.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,5 @@
77
<!-- this problem is to be addressed in ZOOKEEPER-3227 -->
88
<Bug pattern="DM_DEFAULT_ENCODING"/>
99

10-
<!-- not really a problem -->
11-
<Bug pattern="DM_EXIT"/>
12-
1310
</FindBugsFilter>
1411

zookeeper-server/src/main/java/org/apache/zookeeper/util/ServiceUtils.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
*/
1818
package org.apache.zookeeper.util;
1919

20+
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
2021
import java.util.Objects;
2122
import java.util.function.Consumer;
2223
import org.apache.zookeeper.ZooKeeperMain;
@@ -37,6 +38,7 @@ private ServiceUtils() {
3738
/**
3839
* Default strategy for shutting down the JVM.
3940
*/
41+
@SuppressFBWarnings("DM_EXIT")
4042
public static final Consumer<Integer> SYSTEM_EXIT = (code) -> {
4143
LOG.error("Exiting JVM with code {}", code);
4244
System.exit(code);

0 commit comments

Comments
 (0)