Make classes static wherever possible
This commit is contained in:
parent
9a4296f320
commit
9a87f1748c
@ -744,7 +744,7 @@ abstract class AbstractNioWorker implements Worker, ExternalResourceReleasable {
|
||||
}
|
||||
}
|
||||
|
||||
protected void cleanUpWriteBuffer(AbstractNioChannel<?> channel) {
|
||||
protected static void cleanUpWriteBuffer(AbstractNioChannel<?> channel) {
|
||||
Exception cause = null;
|
||||
boolean fireExceptionCaught = false;
|
||||
|
||||
|
@ -148,7 +148,7 @@ final class SocketSendBufferPool implements ExternalResourceReleasable {
|
||||
return q << ALIGN_SHIFT;
|
||||
}
|
||||
|
||||
private final class Preallocation {
|
||||
private static final class Preallocation {
|
||||
final ByteBuffer buffer;
|
||||
int refCnt;
|
||||
|
||||
@ -177,7 +177,7 @@ final class SocketSendBufferPool implements ExternalResourceReleasable {
|
||||
void release();
|
||||
}
|
||||
|
||||
class UnpooledSendBuffer implements SendBuffer {
|
||||
static class UnpooledSendBuffer implements SendBuffer {
|
||||
|
||||
final ByteBuffer buffer;
|
||||
final int initialPos;
|
||||
@ -233,7 +233,7 @@ final class SocketSendBufferPool implements ExternalResourceReleasable {
|
||||
}
|
||||
}
|
||||
|
||||
class GatheringSendBuffer implements SendBuffer {
|
||||
static class GatheringSendBuffer implements SendBuffer {
|
||||
|
||||
private final ByteBuffer[] buffers;
|
||||
private final int last;
|
||||
|
@ -15,11 +15,6 @@
|
||||
*/
|
||||
package org.jboss.netty.handler.codec.spdy;
|
||||
|
||||
import static org.jboss.netty.handler.codec.spdy.SpdyCodecUtil.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.jboss.netty.channel.ChannelDownstreamHandler;
|
||||
import org.jboss.netty.channel.ChannelEvent;
|
||||
import org.jboss.netty.channel.ChannelFuture;
|
||||
@ -34,6 +29,11 @@ import org.jboss.netty.handler.codec.http.HttpMessage;
|
||||
import org.jboss.netty.handler.codec.http.HttpRequest;
|
||||
import org.jboss.netty.handler.codec.http.HttpResponse;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static org.jboss.netty.handler.codec.spdy.SpdyCodecUtil.*;
|
||||
|
||||
/**
|
||||
* Encodes {@link HttpRequest}s, {@link HttpResponse}s, and {@link HttpChunk}s
|
||||
* into {@link SpdySynStreamFrame}s and {@link SpdySynReplyFrame}s.
|
||||
@ -234,7 +234,7 @@ public class SpdyHttpEncoder implements ChannelDownstreamHandler {
|
||||
return future;
|
||||
}
|
||||
|
||||
private class SpdyFrameWriter implements ChannelFutureListener {
|
||||
private static class SpdyFrameWriter implements ChannelFutureListener {
|
||||
|
||||
private final ChannelHandlerContext ctx;
|
||||
private final MessageEvent e;
|
||||
|
@ -60,7 +60,7 @@ public class LocalClientTest {
|
||||
cb.releaseExternalResources();
|
||||
}
|
||||
|
||||
final class ExceptionHandler extends SimpleChannelUpstreamHandler {
|
||||
static final class ExceptionHandler extends SimpleChannelUpstreamHandler {
|
||||
private final CountDownLatch latch = new CountDownLatch(1);
|
||||
private Throwable t;
|
||||
|
||||
|
@ -142,7 +142,7 @@ public abstract class AbstractDatagramMulticastTest {
|
||||
return buf;
|
||||
}
|
||||
|
||||
private final class MulticastTestHandler extends SimpleChannelUpstreamHandler {
|
||||
private static final class MulticastTestHandler extends SimpleChannelUpstreamHandler {
|
||||
private final CountDownLatch latch = new CountDownLatch(1);
|
||||
|
||||
private boolean done;
|
||||
|
@ -139,7 +139,7 @@ public abstract class AbstractSocketEchoTest {
|
||||
}
|
||||
}
|
||||
|
||||
private class EchoHandler extends SimpleChannelUpstreamHandler {
|
||||
private static class EchoHandler extends SimpleChannelUpstreamHandler {
|
||||
volatile Channel channel;
|
||||
final AtomicReference<Throwable> exception = new AtomicReference<Throwable>();
|
||||
volatile int counter;
|
||||
|
@ -141,7 +141,7 @@ public abstract class AbstractSocketFixedLengthEchoTest {
|
||||
}
|
||||
}
|
||||
|
||||
private class EchoHandler extends SimpleChannelUpstreamHandler {
|
||||
private static class EchoHandler extends SimpleChannelUpstreamHandler {
|
||||
volatile Channel channel;
|
||||
final AtomicReference<Throwable> exception = new AtomicReference<Throwable>();
|
||||
volatile int counter;
|
||||
|
@ -71,7 +71,7 @@ public class ReplayingDecoderBufferTest {
|
||||
assertEquals(10, i);
|
||||
}
|
||||
|
||||
private class ReplayDecoderImpl extends ReplayingDecoder<VoidEnum> {
|
||||
private static class ReplayDecoderImpl extends ReplayingDecoder<VoidEnum> {
|
||||
private final ChannelBuffer internal = ChannelBuffers.copiedBuffer("TestBuffer", CharsetUtil.ISO_8859_1);
|
||||
|
||||
@Override
|
||||
|
@ -149,7 +149,7 @@ public abstract class AbstractSocketCompatibleObjectStreamEchoTest {
|
||||
}
|
||||
}
|
||||
|
||||
private class EchoHandler extends SimpleChannelUpstreamHandler {
|
||||
private static class EchoHandler extends SimpleChannelUpstreamHandler {
|
||||
volatile Channel channel;
|
||||
final AtomicReference<Throwable> exception = new AtomicReference<Throwable>();
|
||||
volatile int counter;
|
||||
|
@ -150,7 +150,7 @@ public abstract class AbstractSocketObjectStreamEchoTest {
|
||||
}
|
||||
}
|
||||
|
||||
private class EchoHandler extends SimpleChannelUpstreamHandler {
|
||||
private static class EchoHandler extends SimpleChannelUpstreamHandler {
|
||||
volatile Channel channel;
|
||||
final AtomicReference<Throwable> exception = new AtomicReference<Throwable>();
|
||||
volatile int counter;
|
||||
|
@ -251,7 +251,7 @@ public abstract class AbstractSocketSpdyEchoTest {
|
||||
}
|
||||
}
|
||||
|
||||
private class EchoHandler extends SimpleChannelUpstreamHandler {
|
||||
private static class EchoHandler extends SimpleChannelUpstreamHandler {
|
||||
volatile Channel channel;
|
||||
final AtomicReference<Throwable> exception = new AtomicReference<Throwable>();
|
||||
final ChannelBuffer frames;
|
||||
|
@ -268,7 +268,7 @@ public class SpdySessionHandlerTest {
|
||||
|
||||
// Echo Handler opens 4 half-closed streams on session connection
|
||||
// and then sets the number of concurrent streams to 3
|
||||
private class EchoHandler extends SimpleChannelUpstreamHandler {
|
||||
private static class EchoHandler extends SimpleChannelUpstreamHandler {
|
||||
private final int closeSignal;
|
||||
private final boolean server;
|
||||
|
||||
|
@ -154,7 +154,7 @@ public abstract class AbstractSocketStringEchoTest {
|
||||
}
|
||||
}
|
||||
|
||||
private class EchoHandler extends SimpleChannelUpstreamHandler {
|
||||
private static class EchoHandler extends SimpleChannelUpstreamHandler {
|
||||
volatile Channel channel;
|
||||
final AtomicReference<Throwable> exception = new AtomicReference<Throwable>();
|
||||
volatile int counter;
|
||||
|
@ -186,7 +186,7 @@ public abstract class AbstractSocketSslEchoTest {
|
||||
}
|
||||
}
|
||||
|
||||
private class EchoHandler extends SimpleChannelUpstreamHandler {
|
||||
private static class EchoHandler extends SimpleChannelUpstreamHandler {
|
||||
volatile Channel channel;
|
||||
final AtomicReference<Throwable> exception = new AtomicReference<Throwable>();
|
||||
volatile int counter;
|
||||
|
Loading…
x
Reference in New Issue
Block a user