Make inner classes static where possible.

This commit is contained in:
Craig P. Motlin 2011-11-09 21:45:42 -05:00
parent 6f857d271c
commit 1c698494bb
12 changed files with 15 additions and 15 deletions

View File

@ -288,7 +288,7 @@ public class HttpTunnelClientChannel extends AbstractChannel implements
Channels.fireChannelInterestChanged(this); Channels.fireChannelInterestChanged(this);
} }
private class ConsolidatingFutureListener implements ChannelFutureListener { private static class ConsolidatingFutureListener implements ChannelFutureListener {
private final ChannelFuture completionFuture; private final ChannelFuture completionFuture;

View File

@ -61,7 +61,7 @@ class HttpTunnelServerChannelSink extends AbstractChannelSink {
} }
} }
private final class ChannelFutureProxy implements ChannelFutureListener { private static final class ChannelFutureProxy implements ChannelFutureListener {
private final ChannelFuture upstreamFuture; private final ChannelFuture upstreamFuture;
ChannelFutureProxy(ChannelFuture upstreamFuture) { ChannelFutureProxy(ChannelFuture upstreamFuture) {

View File

@ -238,7 +238,7 @@ class ServerMessageSwitch implements ServerMessageSwitchUpstreamInterface,
/** /**
* Used to pass the result received from one ChannelFutureListener to another verbatim. * Used to pass the result received from one ChannelFutureListener to another verbatim.
*/ */
private final class RelayedChannelFutureListener implements private static final class RelayedChannelFutureListener implements
ChannelFutureListener { ChannelFutureListener {
private final ChannelFuture originalFuture; private final ChannelFuture originalFuture;

View File

@ -147,7 +147,7 @@ final class SocketSendBufferPool {
return q << ALIGN_SHIFT; return q << ALIGN_SHIFT;
} }
private final class Preallocation { private static final class Preallocation {
final ByteBuffer buffer; final ByteBuffer buffer;
int refCnt; int refCnt;
@ -176,7 +176,7 @@ final class SocketSendBufferPool {
void release(); void release();
} }
class UnpooledSendBuffer implements SendBuffer { static class UnpooledSendBuffer implements SendBuffer {
final ByteBuffer buffer; final ByteBuffer buffer;
final int initialPos; final int initialPos;
@ -266,7 +266,7 @@ final class SocketSendBufferPool {
} }
} }
final class FileSendBuffer implements SendBuffer { static final class FileSendBuffer implements SendBuffer {
private final FileRegion file; private final FileRegion file;
private long writtenBytes; private long writtenBytes;

View File

@ -67,7 +67,7 @@ final class HttpHeaderDateFormat extends SimpleDateFormat {
* First obsolete format<p> * First obsolete format<p>
* Sunday, 06-Nov-94 08:49:37 GMT -> E, d-MMM-y HH:mm:ss z * Sunday, 06-Nov-94 08:49:37 GMT -> E, d-MMM-y HH:mm:ss z
*/ */
private final class HttpHeaderDateFormatObsolete1 extends SimpleDateFormat { private static final class HttpHeaderDateFormatObsolete1 extends SimpleDateFormat {
private static final long serialVersionUID = -3178072504225114298L; private static final long serialVersionUID = -3178072504225114298L;
HttpHeaderDateFormatObsolete1() { HttpHeaderDateFormatObsolete1() {
@ -81,7 +81,7 @@ final class HttpHeaderDateFormat extends SimpleDateFormat {
* <p> * <p>
* Sun Nov 6 08:49:37 1994 -> EEE, MMM d HH:mm:ss yyyy * Sun Nov 6 08:49:37 1994 -> EEE, MMM d HH:mm:ss yyyy
*/ */
private final class HttpHeaderDateFormatObsolete2 extends SimpleDateFormat { private static final class HttpHeaderDateFormatObsolete2 extends SimpleDateFormat {
private static final long serialVersionUID = 3010674519968303714L; private static final long serialVersionUID = 3010674519968303714L;
HttpHeaderDateFormatObsolete2() { HttpHeaderDateFormatObsolete2() {

View File

@ -1485,7 +1485,7 @@ public class HttpPostRequestDecoder {
* @author frederic bregier * @author frederic bregier
* *
*/ */
public class IncompatibleDataDecoderException extends Exception { public static class IncompatibleDataDecoderException extends Exception {
/** /**
* *
*/ */

View File

@ -147,7 +147,7 @@ public abstract class AbstractSocketEchoTest {
} }
} }
private class EchoHandler extends SimpleChannelUpstreamHandler { private static class EchoHandler extends SimpleChannelUpstreamHandler {
volatile Channel channel; volatile Channel channel;
final AtomicReference<Throwable> exception = new AtomicReference<Throwable>(); final AtomicReference<Throwable> exception = new AtomicReference<Throwable>();
volatile int counter; volatile int counter;

View File

@ -149,7 +149,7 @@ public abstract class AbstractSocketFixedLengthEchoTest {
} }
} }
private class EchoHandler extends SimpleChannelUpstreamHandler { private static class EchoHandler extends SimpleChannelUpstreamHandler {
volatile Channel channel; volatile Channel channel;
final AtomicReference<Throwable> exception = new AtomicReference<Throwable>(); final AtomicReference<Throwable> exception = new AtomicReference<Throwable>();
volatile int counter; volatile int counter;

View File

@ -157,7 +157,7 @@ public abstract class AbstractSocketCompatibleObjectStreamEchoTest {
} }
} }
private class EchoHandler extends SimpleChannelUpstreamHandler { private static class EchoHandler extends SimpleChannelUpstreamHandler {
volatile Channel channel; volatile Channel channel;
final AtomicReference<Throwable> exception = new AtomicReference<Throwable>(); final AtomicReference<Throwable> exception = new AtomicReference<Throwable>();
volatile int counter; volatile int counter;

View File

@ -156,7 +156,7 @@ public abstract class AbstractSocketObjectStreamEchoTest {
} }
} }
private class EchoHandler extends SimpleChannelUpstreamHandler { private static class EchoHandler extends SimpleChannelUpstreamHandler {
volatile Channel channel; volatile Channel channel;
final AtomicReference<Throwable> exception = new AtomicReference<Throwable>(); final AtomicReference<Throwable> exception = new AtomicReference<Throwable>();
volatile int counter; volatile int counter;

View File

@ -162,7 +162,7 @@ public abstract class AbstractSocketStringEchoTest {
} }
} }
private class EchoHandler extends SimpleChannelUpstreamHandler { private static class EchoHandler extends SimpleChannelUpstreamHandler {
volatile Channel channel; volatile Channel channel;
final AtomicReference<Throwable> exception = new AtomicReference<Throwable>(); final AtomicReference<Throwable> exception = new AtomicReference<Throwable>();
volatile int counter; volatile int counter;

View File

@ -194,7 +194,7 @@ public abstract class AbstractSocketSslEchoTest {
} }
} }
private class EchoHandler extends SimpleChannelUpstreamHandler { private static class EchoHandler extends SimpleChannelUpstreamHandler {
volatile Channel channel; volatile Channel channel;
final AtomicReference<Throwable> exception = new AtomicReference<Throwable>(); final AtomicReference<Throwable> exception = new AtomicReference<Throwable>();
volatile int counter; volatile int counter;