sal-binding-api: use lambdas 77/57177/5
authorStephen Kitt <skitt@redhat.com>
Tue, 16 May 2017 15:49:30 +0000 (17:49 +0200)
committerTom Pantelis <tompantelis@gmail.com>
Fri, 15 Sep 2017 20:25:06 +0000 (20:25 +0000)
This series of patches uses lambdas instead of anonymous classes for
functional interfaces when possible. Lambdas are replaced with method
references when appropriate.

Change-Id: I57045a8cfb4dc788eb0d687eceb49ca54e6dc7c8
Signed-off-by: Stephen Kitt <skitt@redhat.com>
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/AbstractBrokerAwareActivator.java

index 9972ce7b8a1fba90bf4c5a95691d1d019be8be09..a489e63410125ed0486c86626af9871bf19a03f8 100644 (file)
@@ -27,13 +27,7 @@ public abstract class AbstractBrokerAwareActivator implements BundleActivator {
         @Override
         public BindingAwareBroker addingService(ServiceReference<BindingAwareBroker> reference) {
             broker = context.getService(reference);
-            mdActivationPool.execute(new Runnable() {
-
-                @Override
-                public void run() {
-                    onBrokerAvailable(broker, context);
-                }
-            });
+            mdActivationPool.execute(() -> onBrokerAvailable(broker, context));
             return broker;
         }
 
@@ -46,13 +40,7 @@ public abstract class AbstractBrokerAwareActivator implements BundleActivator {
         @Override
         public void removedService(ServiceReference<BindingAwareBroker> reference, BindingAwareBroker service) {
             broker = context.getService(reference);
-            mdActivationPool.execute(new Runnable() {
-
-                @Override
-                public void run() {
-                    onBrokerRemoved(broker, context);
-                }
-            });
+            mdActivationPool.execute(() -> onBrokerRemoved(broker, context));
         }
 
     };