Improves the readability of the backup code a bit
All checks were successful
KnarCraft/Minecraft-Server-Launcher/pipeline/head This commit looks good

This commit is contained in:
2021-09-27 22:06:56 +02:00
parent 60fdcf5ddc
commit 71e47acbb0
2 changed files with 62 additions and 32 deletions

View File

@ -75,19 +75,19 @@ public class BackupGUI implements ActionListener {
* Destroys the backup GUI
*/
public static void destroy() {
BackupUtil.abortBackup();
progressTextArea = null;
progressBar = null;
cancelButton = null;
if (frame != null) {
frame.dispose();
frame = null;
progressBar = null;
progressTextArea = null;
cancelButton = null;
}
frame = null;
}
@Override
public void actionPerformed(ActionEvent actionEvent) {
if (actionEvent.getSource() == cancelButton) {
BackupUtil.abortBackup();
destroy();
}
}