Skip to content

Commit

Permalink
errorprone :: SystemExitOutsideMain (#785)
Browse files Browse the repository at this point in the history
  • Loading branch information
sambish5 authored May 30, 2024
1 parent 44779e9 commit 923aacc
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/emissary/admin/PlaceStarter.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
/**
* Static methods to start places in the system.
*/
@SuppressWarnings("SystemExitOutsideMain")
public class PlaceStarter {
private static final Logger logger = LoggerFactory.getLogger(PlaceStarter.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
public class Exit extends Action {

@Override
@SuppressWarnings("SystemExitOutsideMain")
public void trigger(Map<String, Sentinel.Tracker> trackers) {
logger.error("Sentinel detected unrecoverable agents, exiting now -- {}", format(trackers));
System.exit(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ protected void initRollConfig() {
/**
* Create the local output directories
*/
@SuppressWarnings("SystemExitOutsideMain")
protected void setupLocalOutputDir() {
if (!Files.exists(this.outputPath)) {
logger.info("Attempting to create {} output directory, {}", getFilterName(), this.outputPath);
Expand All @@ -116,6 +117,7 @@ protected void setupLocalOutputDir() {
/**
* Create the {@link JournaledCoalescer} and {@link Roller}
*/
@SuppressWarnings("SystemExitOutsideMain")
protected void setupRoller() {
try {
this.rollable = createRollable();
Expand Down
1 change: 1 addition & 0 deletions src/main/java/emissary/roll/RollManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ protected RollManager(Configurator configG) {
/**
* Load the configurator
*/
@SuppressWarnings("SystemExitOutsideMain")
protected void init() {
try {
Configurator configG = ConfigUtil.getConfigInfo(this.getClass());
Expand Down
1 change: 1 addition & 0 deletions src/main/java/emissary/server/api/Shutdown.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public Response forceShutdown(@Context HttpServletRequest request) {
return shutdown(request, true);
}

@SuppressWarnings("SystemExitOutsideMain")
protected Response shutdown(HttpServletRequest request, boolean force) {
try {
LOG.debug("Calling the stop method");
Expand Down

0 comments on commit 923aacc

Please sign in to comment.