From 7044f9a586f67c28810d69f130a8056f0a4c0052 Mon Sep 17 00:00:00 2001 From: Trustin Lee Date: Wed, 4 Mar 2009 14:13:39 +0000 Subject: [PATCH] Fixed find bugs warnings --- .../java/org/jboss/netty/channel/socket/nio/NioWorker.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/jboss/netty/channel/socket/nio/NioWorker.java b/src/main/java/org/jboss/netty/channel/socket/nio/NioWorker.java index 38a224d061..50f3ac0b4d 100644 --- a/src/main/java/org/jboss/netty/channel/socket/nio/NioWorker.java +++ b/src/main/java/org/jboss/netty/channel/socket/nio/NioWorker.java @@ -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) {