mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 10:49:06 +01:00
@GuardedBy annotations.
This commit is contained in:
@@ -22,6 +22,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import javax.annotation.concurrent.GuardedBy;
|
||||
import javax.annotation.concurrent.ThreadSafe;
|
||||
|
||||
import static com.sun.jna.Library.OPTION_FUNCTION_MAPPER;
|
||||
@@ -45,7 +46,8 @@ class WindowsShutdownManagerImpl extends ShutdownManagerImpl {
|
||||
|
||||
private final Map<String, Object> options;
|
||||
|
||||
private boolean initialised = false; // Locking: lock
|
||||
@GuardedBy("lock")
|
||||
private boolean initialised = false;
|
||||
|
||||
WindowsShutdownManagerImpl() {
|
||||
// Use the Unicode versions of Win32 API calls
|
||||
@@ -71,7 +73,7 @@ class WindowsShutdownManagerImpl extends ShutdownManagerImpl {
|
||||
return new StartOnce(r);
|
||||
}
|
||||
|
||||
// Locking: lock
|
||||
@GuardedBy("lock")
|
||||
private void initialise() {
|
||||
if (isWindows()) {
|
||||
new EventLoop().start();
|
||||
|
||||
@@ -182,7 +182,7 @@ class ModemImpl implements Modem, WriteHandler, SerialPortEventListener {
|
||||
}
|
||||
}
|
||||
|
||||
// Locking: stateChange
|
||||
@GuardedBy("stateChange")
|
||||
private void hangUpInner() throws IOException {
|
||||
ReliabilityLayer reliability;
|
||||
lock.lock();
|
||||
|
||||
Reference in New Issue
Block a user