Replace deprecated Futures.addCallback by the newer version
[netconf.git] / netconf / yanglib / src / main / java / org / opendaylight / yanglib / impl / YangLibProvider.java
index f5a648a91f86d0b7d464511d5f14a719210ce52e..df88860c1f7e757ce548c2f0bb171b84a4c661e2 100644 (file)
@@ -14,6 +14,7 @@ import com.google.common.base.Strings;
 import com.google.common.collect.Iterables;
 import com.google.common.util.concurrent.FutureCallback;
 import com.google.common.util.concurrent.Futures;
+import com.google.common.util.concurrent.MoreExecutors;
 import java.io.File;
 import java.util.ArrayList;
 import java.util.List;
@@ -145,7 +146,7 @@ public class YangLibProvider implements AutoCloseable, SchemaSourceListener {
             public void onFailure(final Throwable throwable) {
                 LOG.warn("Unable to update modules state", throwable);
             }
-        });
+        }, MoreExecutors.directExecutor());
     }
 
     @Override
@@ -174,7 +175,7 @@ public class YangLibProvider implements AutoCloseable, SchemaSourceListener {
             public void onFailure(final Throwable throwable) {
                 LOG.warn("Unable to update modules state", throwable);
             }
-        });
+        }, MoreExecutors.directExecutor());
     }