This commit is contained in:
Abraham Kiggundu
2014-12-26 17:35:37 +03:00
parent b074978472
commit 9a2e93ebb9
15 changed files with 25 additions and 43 deletions

View File

@@ -39,7 +39,7 @@ class WindowsShutdownManagerImpl extends ShutdownManagerImpl {
private final Map<String, Object> options;
private boolean initialised = false; // Locking: this
private boolean initialised = false;
private final Lock synchLock = new ReentrantLock();
@@ -69,7 +69,6 @@ class WindowsShutdownManagerImpl extends ShutdownManagerImpl {
return new StartOnce(r);
}
// Locking: this
private void initialise() {
if(OsUtils.isWindows()) {
new EventLoop().start();

View File

@@ -14,14 +14,13 @@ import net.contentobjects.jnotify.JNotifyListener;
abstract class UnixRemovableDriveMonitor implements RemovableDriveMonitor,
JNotifyListener {
private static boolean triedLoad = false; // Locking: class
private static Throwable loadError = null; // Locking: class
private static boolean triedLoad = false;
private static Throwable loadError = null;
// Locking: this
private final List<Integer> watches = new ArrayList<Integer>();
private boolean started = false; // Locking: this
private Callback callback = null; // Locking: this
private boolean started = false;
private Callback callback = null;
protected abstract String[] getPathsToWatch();

View File

@@ -46,8 +46,8 @@ class ModemImpl implements Modem, WriteHandler, SerialPortEventListener {
private int lineLen = 0;
private ReliabilityLayer reliability = null; // Locking: this
private boolean initialised = false, connected = false; // Locking: this
private ReliabilityLayer reliability = null;
private boolean initialised = false, connected = false;
private final Lock synchLock = new ReentrantLock();
private final Condition connectedStateChanged = synchLock.newCondition();
@@ -163,7 +163,6 @@ class ModemImpl implements Modem, WriteHandler, SerialPortEventListener {
}
}
// Locking: stateChange
private void hangUpInner() throws IOException {
ReliabilityLayer reliability;
synchLock.lock();