X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=netconf%2Fnetconf-notifications-impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fnetconf%2Fnotifications%2Fimpl%2Fosgi%2FActivator.java;h=967bd08914e17734628387badc80fe921e770be9;hb=4597743d04e91970310a3214870005d7ec59c30d;hp=21b7d0d83d6bd9fc1f999a594fddbe1522a9763a;hpb=afce5ad359932ef84f239e59888fe041ac7113c9;p=netconf.git diff --git a/netconf/netconf-notifications-impl/src/main/java/org/opendaylight/netconf/notifications/impl/osgi/Activator.java b/netconf/netconf-notifications-impl/src/main/java/org/opendaylight/netconf/notifications/impl/osgi/Activator.java index 21b7d0d83d..967bd08914 100644 --- a/netconf/netconf-notifications-impl/src/main/java/org/opendaylight/netconf/notifications/impl/osgi/Activator.java +++ b/netconf/netconf-notifications-impl/src/main/java/org/opendaylight/netconf/notifications/impl/osgi/Activator.java @@ -41,18 +41,18 @@ public class Activator implements BundleActivator { private NetconfNotificationManager netconfNotificationManager; @Override - public void start(final BundleContext context) throws Exception { + public void start(final BundleContext context) { netconfNotificationManager = new NetconfNotificationManager(); // Add properties to autowire with netconf-impl instance for cfg subsystem final Dictionary props = new Hashtable<>(); props.put(NetconfConstants.SERVICE_NAME, NetconfConstants.NETCONF_NOTIFICATION); netconfNotificationCollectorServiceRegistration = context.registerService(NetconfNotificationCollector.class, - netconfNotificationManager, new Hashtable()); + netconfNotificationManager, new Hashtable<>()); final NetconfOperationServiceFactory netconfOperationServiceFactory = new NetconfOperationServiceFactory() { private final Set capabilities = - Collections.singleton(new BasicCapability(NetconfNotification.NOTIFICATION_NAMESPACE)); + Collections.singleton(new BasicCapability(NetconfNotification.NOTIFICATION_NAMESPACE)); @Override public Set getCapabilities() { @@ -61,8 +61,8 @@ public class Activator implements BundleActivator { @Override public AutoCloseable registerCapabilityListener(final CapabilityListener listener) { - listener.onCapabilitiesChanged(capabilities, Collections.emptySet()); - return () -> listener.onCapabilitiesChanged(Collections.emptySet(), capabilities); + listener.onCapabilitiesChanged(capabilities, Collections.emptySet()); + return () -> listener.onCapabilitiesChanged(Collections.emptySet(), capabilities); } @Override @@ -74,7 +74,7 @@ public class Activator implements BundleActivator { @Override public Set getNetconfOperations() { - return Sets.newHashSet( + return Sets.newHashSet( new Get(netconfSessionIdForReporting, netconfNotificationManager), createSubscription); } @@ -94,7 +94,7 @@ public class Activator implements BundleActivator { } @Override - public void stop(final BundleContext context) throws Exception { + public void stop(final BundleContext context) { if (netconfNotificationCollectorServiceRegistration != null) { netconfNotificationCollectorServiceRegistration.unregister(); netconfNotificationCollectorServiceRegistration = null;