Remove redundant field initialization

This commit is contained in:
Trustin Lee 2012-11-10 06:56:39 +09:00
parent 1b35cfee85
commit 44159abefa
3 changed files with 8 additions and 6 deletions

View File

@ -15,16 +15,16 @@
*/
package org.jboss.netty.channel.socket.nio;
import java.net.InetSocketAddress;
import java.net.SocketAddress;
import java.nio.channels.SocketChannel;
import org.jboss.netty.channel.Channel;
import org.jboss.netty.channel.ChannelFactory;
import org.jboss.netty.channel.ChannelFuture;
import org.jboss.netty.channel.ChannelPipeline;
import org.jboss.netty.channel.ChannelSink;
import java.net.InetSocketAddress;
import java.net.SocketAddress;
import java.nio.channels.SocketChannel;
public class NioSocketChannel extends AbstractNioChannel<SocketChannel>
implements org.jboss.netty.channel.socket.SocketChannel {
@ -32,6 +32,7 @@ public class NioSocketChannel extends AbstractNioChannel<SocketChannel>
private static final int ST_BOUND = 1;
private static final int ST_CONNECTED = 2;
private static final int ST_CLOSED = -1;
@SuppressWarnings("RedundantFieldInitialization")
volatile int state = ST_OPEN;
private final NioSocketChannelConfig config;

View File

@ -60,6 +60,7 @@ final class UTF8Output {
12, 36, 12, 12, 12, 36, 12, 12, 12, 12, 12, 36, 12, 36, 12, 12, 12, 36, 12, 12, 12, 12,
12, 12, 12, 12, 12, 12 };
@SuppressWarnings("RedundantFieldInitialization")
private int state = UTF8_ACCEPT;
private int codep;

View File

@ -146,8 +146,8 @@ public abstract class AbstractDatagramMulticastTest {
private final class MulticastTestHandler extends SimpleChannelUpstreamHandler {
private final CountDownLatch latch = new CountDownLatch(1);
private boolean done = false;
private volatile boolean fail = false;
private boolean done;
private volatile boolean fail;
@Override
public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) throws Exception {