Merge "BUG 9112: NPE in karaf cli when device is still connecting"
[netconf.git] / netconf / netconf-console / src / main / java / org / opendaylight / netconf / console / impl / NetconfCommandsImpl.java
index d211474494ed86bf99bfc7e54b7ce278602a9551..9a9fa6e1ee09c7bf665027827c2f1144cc2c428a 100644 (file)
@@ -12,6 +12,7 @@ import com.google.common.base.Strings;
 import com.google.common.collect.ImmutableList;
 import com.google.common.util.concurrent.FutureCallback;
 import com.google.common.util.concurrent.Futures;
+import com.google.common.util.concurrent.MoreExecutors;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashMap;
@@ -171,7 +172,7 @@ public class NetconfCommandsImpl implements NetconfCommands {
                 LOG.error("Failed to created NetconfNode={}", netconfNode);
                 throw new RuntimeException(throwable);
             }
-        });
+        }, MoreExecutors.directExecutor());
     }
 
     @Override
@@ -253,7 +254,7 @@ public class NetconfCommandsImpl implements NetconfCommands {
                     LOG.error("Failed to updated NetconfNode={}", netconfNode);
                     throw new RuntimeException(throwable);
                 }
-            });
+            }, MoreExecutors.directExecutor());
 
             return "NETCONF node: " + netconfNodeId + " updated successfully.";
         } else {