From 1f4988a4b6f9ecfa055091b3765743525b46b1cd Mon Sep 17 00:00:00 2001 From: Stephen Kitt Date: Tue, 16 May 2017 17:48:50 +0200 Subject: [PATCH] config-persister-feature-adapter: use lambdas 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: Ie1c0dda47a741196de89c95cec49fff572904153 Signed-off-by: Stephen Kitt --- .../internal/FeatureServiceCustomizer.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/opendaylight/config/config-persister-feature-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/FeatureServiceCustomizer.java b/opendaylight/config/config-persister-feature-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/FeatureServiceCustomizer.java index 9a1764e574..0320ea2743 100644 --- a/opendaylight/config/config-persister-feature-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/FeatureServiceCustomizer.java +++ b/opendaylight/config/config-persister-feature-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/FeatureServiceCustomizer.java @@ -14,7 +14,6 @@ import org.apache.karaf.features.Feature; import org.apache.karaf.features.FeaturesListener; import org.apache.karaf.features.FeaturesService; import org.opendaylight.controller.config.persist.api.ConfigPusher; -import org.opendaylight.controller.config.persist.storage.file.xml.FeatureListProvider; import org.opendaylight.controller.config.persist.storage.file.xml.XmlFileStorageAdapter; import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceReference; @@ -41,12 +40,7 @@ public class FeatureServiceCustomizer implements ServiceTrackerCustomizer listFeatures() { - return installedFeatureIds; - } - }); + currentPersister.get().setFeaturesService(() -> installedFeatureIds); } ConfigFeaturesListener configFeaturesListener = new ConfigFeaturesListener(configPusher, featureService); registration = bc.registerService(FeaturesListener.class.getCanonicalName(), configFeaturesListener, null); -- 2.36.6