Drop unneeded generic type specifiers
[yangtools.git] / websocket / websocket-client / src / test / java / org / opendaylight / yangtools / websocket / server / WebSocketServer.java
index 8fb379cb79d30182842080c88a9e9b9661d75071..2ba02b7bce3846618dcde10e67e621e4e304b957 100644 (file)
  */
 package org.opendaylight.yangtools.websocket.server;
 
+import com.google.common.util.concurrent.SettableFuture;
+
 import io.netty.bootstrap.ServerBootstrap;
 import io.netty.channel.Channel;
 import io.netty.channel.EventLoopGroup;
 import io.netty.channel.nio.NioEventLoopGroup;
 import io.netty.channel.socket.nio.NioServerSocketChannel;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.net.SocketAddress;
 import java.net.InetSocketAddress;
-
-import java.util.concurrent.Future;
-import java.util.concurrent.TimeUnit;
+import java.net.SocketAddress;
 import java.util.concurrent.ExecutionException;
-import java.util.concurrent.TimeoutException;
+import java.util.concurrent.Future;
 
-import com.google.common.util.concurrent.SettableFuture;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * A HTTP server which serves Web Socket requests at:
@@ -72,11 +69,12 @@ public class WebSocketServer implements Runnable {
     private static final Logger logger = LoggerFactory.getLogger(WebSocketServer.class.toString());
 
 
-    public WebSocketServer(int inPort) {
+    public WebSocketServer(final int inPort) {
         this.inPort = inPort;
-        port = SettableFuture.<Integer>create();
+        port = SettableFuture.create();
     }
 
+    @Override
     public void run(){
         try {
             startServer();
@@ -92,8 +90,8 @@ public class WebSocketServer implements Runnable {
     public void startServer() throws Exception {
         try {
             bootstrap.group(bossGroup, workerGroup)
-             .channel(NioServerSocketChannel.class)
-             .childHandler(new WebSocketServerInitializer());
+            .channel(NioServerSocketChannel.class)
+            .childHandler(new WebSocketServerInitializer());
 
             Channel ch = bootstrap.bind(inPort).sync().channel();
             SocketAddress localSocket = ch.localAddress();