Replace deprecated Futures.addCallback by the newer version
[netconf.git] / netconf / sal-netconf-connector / src / main / java / org / opendaylight / netconf / sal / connect / netconf / NetconfDevice.java
index b78011460e4e81f4544c79863184e7f7089ea429..22fa4cb92ed49cbd25c38ed9fa119b3f814b0783 100644 (file)
@@ -165,7 +165,7 @@ public class NetconfDevice
             }
         };
 
-        Futures.addCallback(sourceResolverFuture, resolvedSourceCallback);
+        Futures.addCallback(sourceResolverFuture, resolvedSourceCallback, MoreExecutors.directExecutor());
     }
 
     private void registerToBaseNetconfStream(final NetconfDeviceRpc deviceRpc,
@@ -206,7 +206,7 @@ public class NetconfDevice
                 LOG.warn("Unable to subscribe to base notification stream. Schemas will not be reloaded on the fly",
                         throwable);
             }
-        });
+        }, MoreExecutors.directExecutor());
     }
 
     private boolean shouldListenOnSchemaChange(final NetconfSessionPreferences remoteSessionCapabilities) {