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:
parent
378e79b8ad
commit
a49061eb9f
@ -61,12 +61,10 @@ public abstract class CLIApplication {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private final Object stopLock = new Object();
|
|
||||||
private final AtomicBoolean stopping = new AtomicBoolean(false);
|
private final AtomicBoolean stopping = new AtomicBoolean(false);
|
||||||
|
|
||||||
@SuppressWarnings("finally")
|
@SuppressWarnings("finally")
|
||||||
public final void stop() {
|
public final void stop() {
|
||||||
synchronized (stopLock) {
|
|
||||||
synchronized (stopping) {
|
synchronized (stopping) {
|
||||||
if (stopping.get())
|
if (stopping.get())
|
||||||
return;
|
return;
|
||||||
@ -83,8 +81,6 @@ public abstract class CLIApplication {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isStopping() {
|
public boolean isStopping() {
|
||||||
return stopping.get();
|
return stopping.get();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user