Skip to content

Commit

Permalink
tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
grobmeier committed Dec 20, 2023
1 parent a451df4 commit e70c10a
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions src/main/java/org/apache/log4j/chainsaw/ShutdownManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
import java.util.List;

public class ShutdownManager {
private static Logger logger = LogManager.getLogger(ShutdownManager.class);
private static final Logger logger = LogManager.getLogger(ShutdownManager.class);

private JFrame logUI;
private AbstractConfiguration configuration;
private List<ChainsawReceiver> receivers;
private EventListenerList shutdownListenerList;
private final JFrame logUI;
private final AbstractConfiguration configuration;
private final List<ChainsawReceiver> receivers;
private final EventListenerList shutdownListenerList;

/**
* The shutdownAction is called when the user requests to exit Chainsaw, and
Expand Down Expand Up @@ -54,7 +54,6 @@ public boolean shutdown() {
JOptionPane.INFORMATION_MESSAGE) != JOptionPane.YES_OPTION) {
return false;
}

}

final JWindow progressWindow = new JWindow();
Expand Down Expand Up @@ -112,16 +111,13 @@ public boolean shutdown() {
* Ensures all the registered ShutdownListeners are notified.
*/
private void fireShutdownEvent() {
ShutdownListener[] listeners =
shutdownListenerList.getListeners(
ShutdownListener.class);
ShutdownListener[] listeners = shutdownListenerList.getListeners(ShutdownListener.class);

for (ShutdownListener listener : listeners) {
listener.shuttingDown();
}
}


/**
* Configures LogUI's with an action to execute when the user requests to
* exit the application, the default action is to exit the VM. This Action is
Expand All @@ -144,5 +140,4 @@ private void performShutdownAction() {
shutdownAction.actionPerformed(
new ActionEvent(this, ActionEvent.ACTION_PERFORMED, "Shutting Down"));
}

}

0 comments on commit e70c10a

Please sign in to comment.