Replace deprecated Futures.addCallback by the newer version
[netconf.git] / netconf / mdsal-netconf-notification / src / main / java / org / opendaylight / controller / config / yang / netconf / mdsal / notification / NotificationToMdsalWriter.java
index 1535b987f983eb718aee58984bc0511d78f1d755..d5ba353fe64ab4ed812c330c859d0104ddfe826a 100644 (file)
@@ -11,6 +11,7 @@ package org.opendaylight.controller.config.yang.netconf.mdsal.notification;
 import com.google.common.util.concurrent.CheckedFuture;
 import com.google.common.util.concurrent.FutureCallback;
 import com.google.common.util.concurrent.Futures;
+import com.google.common.util.concurrent.MoreExecutors;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
@@ -61,7 +62,7 @@ public final class NotificationToMdsalWriter implements AutoCloseable, NetconfNo
             public void onFailure(Throwable throwable) {
                 LOG.warn("Unable to clear streams", throwable);
             }
-        });
+        }, MoreExecutors.directExecutor());
 
         notificationRegistration.close();
     }