diff options
author | Michal Cmarada <mcmarada@cisco.com> | 2019-06-04 15:57:23 +0200 |
---|---|---|
committer | Michal Cmarada <mcmarada@cisco.com> | 2019-06-04 15:57:23 +0200 |
commit | 2d56b072d51790be31b86ba5995f1d191748c505 (patch) | |
tree | f4848ca1dd011b7eb8b05201af9f6ea1c3a631a9 /infra/northbound | |
parent | a776d7ff3e6f155a37b182dabaa0429fb2c04c3c (diff) |
fix sonar issues
Change-Id: I9c121df82f392f71a21b9ac25c15e7e77071aa25
Signed-off-by: Michal Cmarada <mcmarada@cisco.com>
Diffstat (limited to 'infra/northbound')
-rw-r--r-- | infra/northbound/netconf/src/main/java/io/fd/honeycomb/northbound/netconf/NetconfNotificationMapperProvider.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/infra/northbound/netconf/src/main/java/io/fd/honeycomb/northbound/netconf/NetconfNotificationMapperProvider.java b/infra/northbound/netconf/src/main/java/io/fd/honeycomb/northbound/netconf/NetconfNotificationMapperProvider.java index 9289936ac..15af3b451 100644 --- a/infra/northbound/netconf/src/main/java/io/fd/honeycomb/northbound/netconf/NetconfNotificationMapperProvider.java +++ b/infra/northbound/netconf/src/main/java/io/fd/honeycomb/northbound/netconf/NetconfNotificationMapperProvider.java @@ -57,6 +57,8 @@ public class NetconfNotificationMapperProvider extends ProviderTrait<NetconfOper @Inject private ShutdownHandler shutdownHandler; + private CapabilityChangeNotificationProducer capabilityChangeNotificationProducer; + @Override protected NetconfNotificationOperationServiceFactory create() { LOG.trace("Initializing NotificationToMdsalWriter"); @@ -64,16 +66,15 @@ public class NetconfNotificationMapperProvider extends ProviderTrait<NetconfOper writer.start(); LOG.trace("Initializing CapabilityChangeNotificationProducer"); - final CapabilityChangeNotificationProducer capabilityChangeNotificationProducer = - new CapabilityChangeNotificationProducer(notificationCollector, dataBroker); + capabilityChangeNotificationProducer = + new CapabilityChangeNotificationProducer(notificationCollector, dataBroker); LOG.trace("Providing NetconfNotificationOperationServiceFactory"); final NetconfNotificationOperationServiceFactory netconfNotificationOperationServiceFactory = new NetconfNotificationOperationServiceFactory(notificationRegistry, aggregator); shutdownHandler.register("netconf-notification-service-factory", netconfNotificationOperationServiceFactory); - shutdownHandler.register("capability-change-notification-producer", - capabilityChangeNotificationProducer::close); + shutdownHandler.register("capability-change-notification-producer", capabilityChangeNotificationProducer); shutdownHandler.register("notification-to-mdsal-writer", writer); return netconfNotificationOperationServiceFactory; } |