OPNFLWPLUG-1071 : Removal of javax.annotation.Nonnnull and replacement of javax.annot...
[openflowplugin.git] / openflowjava / openflow-protocol-impl / src / main / java / org / opendaylight / openflowjava / protocol / impl / core / connection / AbstractConnectionAdapter.java
index 151d25c1445b17f57a0ef8510e26772475d3c3b8..a07725951e0aeefb2468873fdddaa2643fb4617d 100644 (file)
@@ -22,8 +22,8 @@ import java.net.InetSocketAddress;
 import java.util.concurrent.Future;
 import java.util.concurrent.RejectedExecutionException;
 import java.util.concurrent.TimeUnit;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.Nullable;
 import org.opendaylight.openflowjava.protocol.api.connection.ConnectionAdapter;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.BarrierInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.BarrierOutput;
@@ -99,7 +99,7 @@ abstract class AbstractConnectionAdapter implements ConnectionAdapter {
     protected Cache<RpcResponseKey, ResponseExpectedRpcListener<?>> responseCache;
 
 
-    AbstractConnectionAdapter(@Nonnull final Channel channel, @Nullable final InetSocketAddress address,
+    AbstractConnectionAdapter(@NonNull final Channel channel, @Nullable final InetSocketAddress address,
                               @Nullable final int channelOutboundQueueSize) {
         this.channel = Preconditions.checkNotNull(channel);
         this.address = address;
@@ -276,7 +276,7 @@ abstract class AbstractConnectionAdapter implements ConnectionAdapter {
     protected <I extends OfHeader, O extends OfHeader> ListenableFuture<RpcResult<O>>
             sendToSwitchExpectRpcResultFuture(final I input, final Class<O> responseClazz,
                     final String failureInfo) {
-        final RpcResponseKey key = new RpcResponseKey(input.getXid(), responseClazz.getName());
+        final RpcResponseKey key = new RpcResponseKey(input.getXid().toJava(), responseClazz.getName());
         final ResponseExpectedRpcListener<O> listener = new ResponseExpectedRpcListener<>(input, failureInfo,
                 responseCache, key);
         return enqueueMessage(listener);