Fix use of deprecated Futures.addCallback() 67/63867/1
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 21 Sep 2017 09:00:24 +0000 (11:00 +0200)
committerVratko Polak <vrpolak@cisco.com>
Mon, 2 Oct 2017 11:25:41 +0000 (13:25 +0200)
Specify MoreExecutors.directExecutor() instead of relying on a deprecated
method.

Change-Id: I097672d7624f5d32957fac3b18b8205c929c5729
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
singleton-service/mdsal-singleton-dom-impl/src/main/java/org/opendaylight/mdsal/singleton/dom/impl/AbstractClusterSingletonServiceProviderImpl.java
singleton-service/mdsal-singleton-dom-impl/src/main/java/org/opendaylight/mdsal/singleton/dom/impl/ClusterSingletonServiceGroupImpl.java

index 0ecf7e01d661e24df8df81eb08ab92f2396bc2f4..0f1d583cbe91f1343656fe5a4e8d2fcbc40735c8 100644 (file)
@@ -222,7 +222,7 @@ public abstract class AbstractClusterSingletonServiceProviderImpl<P extends Path
                     AbstractClusterSingletonServiceProviderImpl.this, throwable);
                 cleanup();
             }
-        });
+        }, MoreExecutors.directExecutor());
     }
 
     @Override
index 82897e6c60366571ee430dd1e675b93194ca9fa8..279129adc012d60ff9c4ce28dfc914653338308d 100644 (file)
@@ -15,6 +15,7 @@ import com.google.common.base.Verify;
 import com.google.common.util.concurrent.FutureCallback;
 import com.google.common.util.concurrent.Futures;
 import com.google.common.util.concurrent.ListenableFuture;
+import com.google.common.util.concurrent.MoreExecutors;
 import com.google.common.util.concurrent.SettableFuture;
 import java.util.ArrayList;
 import java.util.List;
@@ -533,7 +534,7 @@ final class ClusterSingletonServiceGroupImpl<P extends Path<P>, E extends Generi
             public void onSuccess(final List<Void> nulls) {
                 onServicesStopped();
             }
-        });
+        }, MoreExecutors.directExecutor());
     }
 
     void onServicesStopped() {