*/
package org.opendaylight.mdsal.dom.broker.osgi;
-import org.opendaylight.mdsal.dom.api.DOMSchemaService;
import java.util.Hashtable;
+import org.opendaylight.mdsal.dom.api.DOMSchemaService;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceRegistration;
public class SchemaServiceActivator implements BundleActivator {
-
-
private ServiceRegistration<DOMSchemaService> schemaServiceReg;
private OsgiBundleScanningSchemaService schemaService;
@Override
public void start(final BundleContext context) {
schemaService = OsgiBundleScanningSchemaService.createInstance(context);
- schemaServiceReg = context.registerService(DOMSchemaService.class, schemaService, new Hashtable<String,String>());
+ schemaServiceReg = context.registerService(DOMSchemaService.class,
+ schemaService, new Hashtable<>());
}
@Override
- public void stop(final BundleContext context) throws Exception {
+ public void stop(final BundleContext context) {
schemaServiceReg.unregister();
schemaService.close();
}