Fix inspection warnings
This commit is contained in:
parent
d1d9f131da
commit
be6cc9c324
@ -14,6 +14,22 @@
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright 2012 The Netty Project
|
||||
*
|
||||
* The Netty Project licenses this file to you under the Apache License,
|
||||
* version 2.0 (the "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at:
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright 2012 The Netty Project
|
||||
*
|
||||
@ -144,7 +160,7 @@ public final class NioEventLoop extends SingleThreadEventLoop {
|
||||
}
|
||||
}
|
||||
|
||||
void executeWhenWritable(AbstractNioChannel channel, NioTask<? extends SelectableChannel> task) {
|
||||
void executeWhenWritable(AbstractNioChannel channel, NioTask<SelectableChannel> task) {
|
||||
if (channel == null) {
|
||||
throw new NullPointerException("channel");
|
||||
}
|
||||
@ -154,7 +170,7 @@ public final class NioEventLoop extends SingleThreadEventLoop {
|
||||
}
|
||||
|
||||
SelectionKey key = channel.selectionKey();
|
||||
channel.writableTasks.offer((NioTask<SelectableChannel>) task);
|
||||
channel.writableTasks.offer(task);
|
||||
key.interestOps(key.interestOps() | SelectionKey.OP_WRITE);
|
||||
}
|
||||
|
||||
@ -388,7 +404,7 @@ public final class NioEventLoop extends SingleThreadEventLoop {
|
||||
if (ch.writableTasks.isEmpty()) {
|
||||
ch.unsafe().flushNow();
|
||||
} else {
|
||||
NioTask<SelectableChannel> task = null;
|
||||
NioTask<SelectableChannel> task;
|
||||
for (;;) {
|
||||
task = ch.writableTasks.poll();
|
||||
if (task == null) { break; }
|
||||
@ -399,7 +415,7 @@ public final class NioEventLoop extends SingleThreadEventLoop {
|
||||
}
|
||||
|
||||
private static void unregisterWritableTasks(AbstractNioChannel ch) {
|
||||
NioTask<SelectableChannel> task = null;
|
||||
NioTask<SelectableChannel> task;
|
||||
for (;;) {
|
||||
task = ch.writableTasks.poll();
|
||||
if (task == null) {
|
||||
|
Loading…
Reference in New Issue
Block a user