Fix utility classes - missing final modifiers etc

This commit is contained in:
Trustin Lee 2012-11-09 17:44:40 +09:00
parent 8842f8ef90
commit 96a769805b
3 changed files with 14 additions and 19 deletions

View File

@ -47,8 +47,8 @@ public final class MonitorRegistries implements Iterable<MonitorRegistry> {
return Holder.INSTANCE; return Holder.INSTANCE;
} }
private static final class Holder { private interface Holder {
private static final MonitorRegistries INSTANCE = new MonitorRegistries(); MonitorRegistries INSTANCE = new MonitorRegistries();
} }
private static final ServiceLoader<MonitorRegistryFactory> FACTORIES = ServiceLoader private static final ServiceLoader<MonitorRegistryFactory> FACTORIES = ServiceLoader

View File

@ -15,7 +15,6 @@
*/ */
package io.netty.testsuite.transport.socket; package io.netty.testsuite.transport.socket;
import static org.junit.Assert.*;
import io.netty.bootstrap.Bootstrap; import io.netty.bootstrap.Bootstrap;
import io.netty.bootstrap.ServerBootstrap; import io.netty.bootstrap.ServerBootstrap;
import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBuf;
@ -28,7 +27,15 @@ import io.netty.channel.ChannelInboundByteHandlerAdapter;
import io.netty.channel.ChannelInitializer; import io.netty.channel.ChannelInitializer;
import io.netty.channel.socket.SocketChannel; import io.netty.channel.socket.SocketChannel;
import io.netty.handler.ssl.SslHandler; import io.netty.handler.ssl.SslHandler;
import org.junit.Test;
import javax.net.ssl.KeyManagerFactory;
import javax.net.ssl.ManagerFactoryParameters;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLEngine;
import javax.net.ssl.TrustManager;
import javax.net.ssl.TrustManagerFactorySpi;
import javax.net.ssl.X509TrustManager;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
@ -42,15 +49,7 @@ import java.util.Random;
import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.atomic.AtomicReference;
import javax.net.ssl.KeyManagerFactory; import static org.junit.Assert.*;
import javax.net.ssl.ManagerFactoryParameters;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLEngine;
import javax.net.ssl.TrustManager;
import javax.net.ssl.TrustManagerFactorySpi;
import javax.net.ssl.X509TrustManager;
import org.junit.Test;
public class SocketSslEchoTest extends AbstractSocketTest { public class SocketSslEchoTest extends AbstractSocketTest {
@ -211,7 +210,7 @@ public class SocketSslEchoTest extends AbstractSocketTest {
} }
} }
private static class BogusSslContextFactory { private static final class BogusSslContextFactory {
private static final String PROTOCOL = "TLS"; private static final String PROTOCOL = "TLS";
private static final SSLContext SERVER_CONTEXT; private static final SSLContext SERVER_CONTEXT;
@ -597,9 +596,5 @@ public class SocketSslEchoTest extends AbstractSocketTest {
public static char[] getKeyStorePassword() { public static char[] getKeyStorePassword() {
return "secret".toCharArray(); return "secret".toCharArray();
} }
private BogusKeyStore() {
// Unused
}
} }
} }

View File

@ -23,7 +23,7 @@ import java.net.ServerSocket;
import java.nio.channels.Channel; import java.nio.channels.Channel;
import java.util.*; import java.util.*;
public class TestUtils { public final class TestUtils {
private static final int START_PORT = 32768; private static final int START_PORT = 32768;
private static final int END_PORT = 65536; private static final int END_PORT = 65536;