Make classes static wherever possible

This commit is contained in:
Trustin Lee 2012-11-10 07:32:53 +09:00
parent c77bac44a2
commit f77f13faf0
8 changed files with 9 additions and 8 deletions

View File

@ -273,7 +273,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 ChannelInboundMessageHandlerAdapter<Object> {
private static class EchoHandler extends ChannelInboundMessageHandlerAdapter<Object> {
private final int closeSignal;
private final boolean server;

View File

@ -117,7 +117,7 @@ public final class MonitorRegistries implements Iterable<MonitorRegistry> {
return new MonitorRegistryIterator(FACTORIES.iterator());
}
private final class MonitorRegistryIterator implements Iterator<MonitorRegistry> {
private static final class MonitorRegistryIterator implements Iterator<MonitorRegistry> {
private final Iterator<MonitorRegistryFactory> factories;

View File

@ -95,7 +95,7 @@ public class DatagramMulticastTest extends AbstractDatagramTest {
}
private final class MulticastTestHandler extends ChannelInboundMessageHandlerAdapter<DatagramPacket> {
private static final class MulticastTestHandler extends ChannelInboundMessageHandlerAdapter<DatagramPacket> {
private final CountDownLatch latch = new CountDownLatch(1);
private boolean done;

View File

@ -94,7 +94,7 @@ public class ServerSocketSuspendTest extends AbstractServerSocketTest {
}
@ChannelHandler.Sharable
private final class AcceptedChannelCounter extends ChannelInboundByteHandlerAdapter {
private static final class AcceptedChannelCounter extends ChannelInboundByteHandlerAdapter {
final CountDownLatch latch;

View File

@ -229,7 +229,7 @@ public class SocketSpdyEchoTest extends AbstractSocketTest {
}
}
private class SpdyEchoTestServerHandler extends ChannelInboundMessageHandlerAdapter<Object> {
private static class SpdyEchoTestServerHandler extends ChannelInboundMessageHandlerAdapter<Object> {
final AtomicReference<Throwable> exception = new AtomicReference<Throwable>();
@Override
@ -245,7 +245,7 @@ public class SocketSpdyEchoTest extends AbstractSocketTest {
}
}
private class SpdyEchoTestClientHandler extends ChannelInboundByteHandlerAdapter {
private static class SpdyEchoTestClientHandler extends ChannelInboundByteHandlerAdapter {
final AtomicReference<Throwable> exception = new AtomicReference<Throwable>();
final ByteBuf frames;
volatile int counter;

View File

@ -15,6 +15,7 @@
*/
package com.sun.nio.sctp;
@SuppressWarnings("all")
public class AbstractNotificationHandler<T> implements NotificationHandler<T> {
static {
UnsupportedOperatingSystemException.raise();

View File

@ -247,7 +247,7 @@ public abstract class AbstractBootstrap<B extends AbstractBootstrap<?>> {
return attrs;
}
private final class BootstrapChannelFactory implements ChannelFactory {
private static final class BootstrapChannelFactory implements ChannelFactory {
private final Class<? extends Channel> clazz;
BootstrapChannelFactory(Class<? extends Channel> clazz) {

View File

@ -126,7 +126,7 @@ public class LocalTransportThreadModelTest2 {
}
@Sharable
class LocalHander extends ChannelInboundMessageHandlerAdapter<Object> {
static class LocalHander extends ChannelInboundMessageHandlerAdapter<Object> {
private final String name;
public volatile ChannelFuture lastWriteFuture;