Removed the whole stop method synchronization block in CLIApplication. Not necessary due to the other one at the beginning of the method.

This commit is contained in:
Marc Baloup 2023-08-17 18:04:07 +02:00
parent 378e79b8ad
commit a49061eb9f

View File

@ -61,12 +61,10 @@ public abstract class CLIApplication {
}
private final Object stopLock = new Object();
private final AtomicBoolean stopping = new AtomicBoolean(false);
@SuppressWarnings("finally")
public final void stop() {
synchronized (stopLock) {
synchronized (stopping) {
if (stopping.get())
return;
@ -83,8 +81,6 @@ public abstract class CLIApplication {
}
}
}
public boolean isStopping() {
return stopping.get();
}