Replace deprecated Futures.addCallback by the newer version
[netconf.git] / netconf / mdsal-netconf-yang-library / src / main / java / org / opendaylight / netconf / mdsal / yang / library / SchemaServiceToMdsalWriter.java
index 9690ad3e243354ec7294d2c494b417845857186f..d0d383a2bb0dbfe28f2d59ef3cf94f4dc2aa163b 100644 (file)
@@ -11,6 +11,7 @@ package org.opendaylight.netconf.mdsal.yang.library;
 import com.google.common.collect.Lists;
 import com.google.common.util.concurrent.FutureCallback;
 import com.google.common.util.concurrent.Futures;
+import com.google.common.util.concurrent.MoreExecutors;
 import java.util.List;
 import java.util.Set;
 import java.util.concurrent.atomic.AtomicInteger;
@@ -91,7 +92,7 @@ public class SchemaServiceToMdsalWriter implements SchemaContextListener, AutoCl
             public void onFailure(final Throwable throwable) {
                 LOG.warn("Failed to update modules state", throwable);
             }
-        });
+        }, MoreExecutors.directExecutor());
     }
 
     private ModulesState createModuleStateFromModules(final Set<Module> modules) {