Fix more inspector warnings introduced by recent mergences

This commit is contained in:
Trustin Lee 2012-12-01 00:10:42 +09:00
parent 6208c62888
commit 00c4b944e4
9 changed files with 22 additions and 18 deletions

View File

@ -73,7 +73,7 @@ public abstract class SocksMessage {
}
public byte getByteValue() {
return this.b;
return b;
}
}
@ -99,7 +99,7 @@ public abstract class SocksMessage {
}
public byte getByteValue() {
return this.b;
return b;
}
}
@ -125,7 +125,7 @@ public abstract class SocksMessage {
}
public byte getByteValue() {
return this.b;
return b;
}
}
@ -149,7 +149,7 @@ public abstract class SocksMessage {
}
public byte getByteValue() {
return this.b;
return b;
}
}
@ -181,7 +181,7 @@ public abstract class SocksMessage {
}
public byte getByteValue() {
return this.b;
return b;
}
}
@ -206,7 +206,7 @@ public abstract class SocksMessage {
}
public byte getByteValue() {
return this.b;
return b;
}
}

View File

@ -17,12 +17,13 @@ package io.netty.codec.socks;
import io.netty.channel.embedded.EmbeddedByteChannel;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import static org.junit.Assert.*;
public class SocksAuthRequestDecoderTest {
private static final org.slf4j.Logger logger = LoggerFactory.getLogger(SocksAuthRequestDecoderTest.class);
private static final Logger logger = LoggerFactory.getLogger(SocksAuthRequestDecoderTest.class);
@Test
public void testAuthRequestDecoder() {
String username = "test";

View File

@ -17,12 +17,13 @@ package io.netty.codec.socks;
import io.netty.channel.embedded.EmbeddedByteChannel;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import static org.junit.Assert.*;
public class SocksAuthResponseDecoderTest {
private static final org.slf4j.Logger logger = LoggerFactory.getLogger(SocksAuthResponseDecoderTest.class);
private static final Logger logger = LoggerFactory.getLogger(SocksAuthResponseDecoderTest.class);
private static void testSocksAuthResponseDecoderWithDifferentParams(SocksMessage.AuthStatus authStatus){
logger.debug("Testing SocksAuthResponseDecoder with authStatus: "+ authStatus);
SocksAuthResponse msg = new SocksAuthResponse(authStatus);

View File

@ -17,13 +17,14 @@ package io.netty.codec.socks;
import io.netty.channel.embedded.EmbeddedByteChannel;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import sun.net.util.IPAddressUtil;
import static org.junit.Assert.*;
public class SocksCmdRequestDecoderTest {
private static final org.slf4j.Logger logger = LoggerFactory.getLogger(SocksCmdRequestDecoderTest.class);
private static final Logger logger = LoggerFactory.getLogger(SocksCmdRequestDecoderTest.class);
private static void testSocksCmdRequestDecoderWithDifferentParams(SocksMessage.CmdType cmdType, SocksMessage.AddressType addressType, String host, int port) {
logger.debug("Testing cmdType: " + cmdType + " addressType: " + addressType + " host: " + host + " port: " + port);

View File

@ -17,12 +17,13 @@ package io.netty.codec.socks;
import io.netty.channel.embedded.EmbeddedByteChannel;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import static org.junit.Assert.*;
public class SocksCmdResponseDecoderTest {
private static final org.slf4j.Logger logger = LoggerFactory.getLogger(SocksCmdResponseDecoderTest.class);
private static final Logger logger = LoggerFactory.getLogger(SocksCmdResponseDecoderTest.class);
private static void testSocksCmdResponseDecoderWithDifferentParams(SocksMessage.CmdStatus cmdStatus, SocksMessage.AddressType addressType){
logger.debug("Testing cmdStatus: " + cmdStatus + " addressType: " + addressType);

View File

@ -19,7 +19,7 @@ import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import io.netty.channel.embedded.EmbeddedByteChannel;
class SocksCommonTestUtils {
final class SocksCommonTestUtils {
/**
* A constructor to stop this class being constructed.
*/

View File

@ -208,7 +208,7 @@ public class DelimiterBasedFrameDecoder extends ByteToMessageDecoder<Object> {
* Return {@code true} if the current instance is a subclass of DelimiterBasedFrameDecoder
*/
private boolean isSubclass() {
return this.getClass() != DelimiterBasedFrameDecoder.class;
return getClass() != DelimiterBasedFrameDecoder.class;
}
@Override
public Object decode(ChannelHandlerContext ctx, ByteBuf buffer) throws Exception {

View File

@ -71,7 +71,7 @@ public final class SocksServerHandler extends ChannelInboundMessageHandlerAdapte
}
@Override
public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable throwable) throws Exception {
public void exceptionCaught(ChannelHandlerContext ctx, Throwable throwable) throws Exception {
throwable.printStackTrace();
SocksServerUtils.closeOnFlush(ctx.channel());
}

View File

@ -71,17 +71,17 @@ public class DefaultChannelPipelineTest {
final String prefixX = "x";
for (int i = 0; i < handlerNum; i++) {
if (i % 2 == 0) {
pipeline.addFirst(prefixX + String.valueOf(i), handlers1[i]);
pipeline.addFirst(prefixX + i, handlers1[i]);
} else {
pipeline.addLast(prefixX + String.valueOf(i), handlers1[i]);
pipeline.addLast(prefixX + i, handlers1[i]);
}
}
for (int i = 0; i < handlerNum; i++) {
if (i % 2 != 0) {
pipeline.addBefore(prefixX + String.valueOf(i), String.valueOf(i), handlers2[i]);
pipeline.addBefore(prefixX + i, String.valueOf(i), handlers2[i]);
} else {
pipeline.addAfter(prefixX + String.valueOf(i), String.valueOf(i), handlers2[i]);
pipeline.addAfter(prefixX + i, String.valueOf(i), handlers2[i]);
}
}
@ -115,7 +115,7 @@ public class DefaultChannelPipelineTest {
verifyContextNumber(pipeline, 8);
}
private int next(DefaultChannelHandlerContext ctx) {
private static int next(DefaultChannelHandlerContext ctx) {
DefaultChannelHandlerContext next = ctx.next;
if (next == null) {
return Integer.MAX_VALUE;