config-persister-feature4-adapter: use lambdas
[controller.git] / opendaylight / config / config-persister-feature4-adapter / src / main / java / org / opendaylight / controller / configpusherfeature / internal / FeatureServiceCustomizer.java
index 91c1a938737cab96199bb827dd8a75387fc12d91..68ae3d31cbafd2776cfa17fd645f14e685ac63e4 100644 (file)
@@ -16,7 +16,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;
@@ -50,12 +49,7 @@ public class FeatureServiceCustomizer implements ServiceTrackerCustomizer<Featur
                 LOG.error("Error listing installed features", e);
             }
 
-            currentPersister.get().setFeaturesService(new FeatureListProvider() {
-                @Override
-                public Set<String> listFeatures() {
-                    return installedFeatureIds;
-                }
-            });
+            currentPersister.get().setFeaturesService(() -> installedFeatureIds);
         }
         ConfigFeaturesListener configFeaturesListener = new ConfigFeaturesListener(configPusher, featureService);
         registration = bc.registerService(FeaturesListener.class.getCanonicalName(), configFeaturesListener, null);