Fix findbugs violations in applications
[openflowplugin.git] / applications / topology-lldp-discovery / src / main / java / org / opendaylight / openflowplugin / applications / topology / lldp / LLDPActivator.java
index 3e5fb3bf10b96a5f69302b7e73ac259d34ac7b88..f3709a694b251e1441342e295674f37579820d6f 100644 (file)
@@ -7,7 +7,9 @@
  */
 package org.opendaylight.openflowplugin.applications.topology.lldp;
 
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import org.opendaylight.controller.sal.binding.api.NotificationProviderService;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.lldp.discovery.config.rev160511.TopologyLldpDiscoveryConfig;
 import org.opendaylight.yangtools.concepts.ListenerRegistration;
 import org.opendaylight.yangtools.yang.binding.NotificationListener;
 import org.slf4j.Logger;
@@ -20,9 +22,10 @@ public class LLDPActivator implements AutoCloseable {
 
     private final ListenerRegistration<NotificationListener> lldpNotificationRegistration;
 
+    @SuppressFBWarnings("ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD")
     public LLDPActivator(NotificationProviderService notificationService, LLDPDiscoveryListener lldpDiscoveryListener,
-            String secureKey) {
-        lldpSecureKey = secureKey;
+                         TopologyLldpDiscoveryConfig topologyLldpDiscoveryConfig) {
+        lldpSecureKey = topologyLldpDiscoveryConfig.getLldpSecureKey();
 
         LOG.info("Starting LLDPActivator with lldpSecureKey: {}", lldpSecureKey);