Automatic code cleanup

This commit is contained in:
Trustin Lee 2008-12-08 08:24:48 +00:00
parent 799a95774c
commit 22b3885fe5
5 changed files with 10 additions and 9 deletions

View File

@ -108,7 +108,7 @@ public class HttpMethod implements Comparable<HttpMethod> {
}
}
private String method;
private final String method;
public HttpMethod(String method) {
if (method == null) {

View File

@ -68,10 +68,10 @@ public class HttpVersion implements Comparable<HttpVersion> {
throw new IllegalArgumentException("invalid version format: " + value);
}
this.protocolName = m.group(1);
this.majorVersion = Integer.parseInt(m.group(2));
this.minorVersion = Integer.parseInt(m.group(3));
this.string = protocolName + '/' + majorVersion + '.' + minorVersion;
protocolName = m.group(1);
majorVersion = Integer.parseInt(m.group(2));
minorVersion = Integer.parseInt(m.group(3));
string = protocolName + '/' + majorVersion + '.' + minorVersion;
}
public HttpVersion(
@ -101,7 +101,7 @@ public class HttpVersion implements Comparable<HttpVersion> {
this.protocolName = protocolName;
this.majorVersion = majorVersion;
this.minorVersion = minorVersion;
this.string = protocolName + '/' + majorVersion + '.' + minorVersion;
string = protocolName + '/' + majorVersion + '.' + minorVersion;
}
public String getProtocolName() {

View File

@ -128,7 +128,7 @@ public class TimeBasedUuidGenerator {
final long ts;
final int cs;
synchronized (counterLock) {
cs = (clockSeq ++) & 0x3FFF; // 0~16383
cs = clockSeq ++ & 0x3FFF; // 0~16383
if (cs == 0) {
// Not all platform has millisecond precision for
// System.currentTimeMillis() - Just focus on generating

View File

@ -112,7 +112,7 @@ public class CompleteChannelFutureTest {
throw new Error();
}
}
private static class ExpectedError extends Error {
private static final long serialVersionUID = 7059276744882005047L;

View File

@ -22,6 +22,8 @@
*/
package org.jboss.netty.channel.socket;
import static org.junit.Assert.*;
import java.io.IOException;
import java.net.InetAddress;
import java.net.InetSocketAddress;
@ -33,7 +35,6 @@ import org.jboss.netty.channel.ChannelFuture;
import org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory;
import org.jboss.netty.util.DummyHandler;
import org.jboss.netty.util.TimeBasedUuidGenerator;
import static org.junit.Assert.*;
import org.junit.Test;