Fix raw references to Promise 38/12638/2
authorRobert Varga <rovarga@cisco.com>
Fri, 7 Nov 2014 18:22:24 +0000 (19:22 +0100)
committerRobert Varga <rovarga@cisco.com>
Sat, 8 Nov 2014 11:20:39 +0000 (12:20 +0100)
Adds the proper type, so we do not have the warnings.

Change-Id: Ib02779460f60f54e31f64815fd5cc6f68460ba83
Signed-off-by: Robert Varga <rovarga@cisco.com>
opendaylight/netconf/netconf-client/src/test/java/org/opendaylight/controller/netconf/client/NetconfClientSessionNegotiatorFactoryTest.java
opendaylight/netconf/netconf-client/src/test/java/org/opendaylight/controller/netconf/client/NetconfClientSessionNegotiatorTest.java

index 95fdcccab80a08f839666a152d89c722158bb949..62d6275b9ef004440db7f6a075b114b476edb2c1 100644 (file)
@@ -17,7 +17,6 @@ import org.junit.Test;
 import org.opendaylight.controller.netconf.util.messages.NetconfHelloMessageAdditionalHeader;
 import org.opendaylight.protocol.framework.SessionListenerFactory;
 import org.opendaylight.protocol.framework.SessionNegotiator;
-
 import static org.junit.Assert.assertNotNull;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
@@ -27,15 +26,15 @@ public class NetconfClientSessionNegotiatorFactoryTest {
     public void testGetSessionNegotiator() throws Exception {
         NetconfClientSessionListener sessionListener = mock(NetconfClientSessionListener.class);
         Timer timer = new HashedWheelTimer();
-        SessionListenerFactory listenerFactory = mock(SessionListenerFactory.class);
+        SessionListenerFactory<NetconfClientSessionListener> listenerFactory = mock(SessionListenerFactory.class);
         doReturn(sessionListener).when(listenerFactory).getSessionListener();
 
         Channel channel = mock(Channel.class);
-        Promise promise = mock(Promise.class);
+        Promise<NetconfClientSession> promise = mock(Promise.class);
         NetconfClientSessionNegotiatorFactory negotiatorFactory = new NetconfClientSessionNegotiatorFactory(timer,
                 Optional.<NetconfHelloMessageAdditionalHeader>absent(), 200L);
 
-        SessionNegotiator sessionNegotiator = negotiatorFactory.getSessionNegotiator(listenerFactory, channel, promise);
+        SessionNegotiator<?> sessionNegotiator = negotiatorFactory.getSessionNegotiator(listenerFactory, channel, promise);
         assertNotNull(sessionNegotiator);
     }
 }
index 9993f48a4d2029977c62c35a4e28de7a122ac422..ac715d87d82132e301c347a0e7d42be203a63049 100644 (file)
@@ -103,7 +103,7 @@ public class NetconfClientSessionNegotiatorTest {
         return pipeline;
     }
 
-    private NetconfClientSessionNegotiator createNetconfClientSessionNegotiator(final Promise promise,
+    private NetconfClientSessionNegotiator createNetconfClientSessionNegotiator(final Promise<NetconfClientSession> promise,
                                                                                 final NetconfMessage startExi) {
         ChannelProgressivePromise progressivePromise = mock(ChannelProgressivePromise.class);
         NetconfClientSessionPreferences preferences = new NetconfClientSessionPreferences(helloMessage, startExi);