Fixed find bugs warnings

This commit is contained in:
Trustin Lee 2009-03-04 14:13:39 +00:00
parent f93c240a7c
commit 7044f9a586

View File

@ -132,7 +132,8 @@ class NioWorker implements Runnable {
assert selector != null && selector.isOpen();
started = true;
registerTaskQueue.offer(registerTask);
boolean offered = registerTaskQueue.offer(registerTask);
assert offered;
}
if (wakenUp.compareAndSet(false, true)) {
@ -333,7 +334,8 @@ class NioWorker implements Runnable {
Thread workerThread = worker.thread;
if (workerThread == null || Thread.currentThread() != workerThread) {
if (channel.writeTaskInTaskQueue.compareAndSet(false, true)) {
worker.writeTaskQueue.offer(channel.writeTask);
boolean offered = worker.writeTaskQueue.offer(channel.writeTask);
assert offered;
}
Selector workerSelector = worker.selector;
if (workerSelector != null) {