From: Robert Varga Date: Mon, 4 Mar 2024 16:06:27 +0000 (+0100) Subject: Fix warnings in topology-lldp-discovery X-Git-Tag: release/calcium~16 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=0c0fd716ab751bb4b7c3f8f0c125626ce6d4bf34;p=openflowplugin.git Fix warnings in topology-lldp-discovery We have a few warnings, fix them up. Change-Id: I6bc16edfc7873350a2186f6bf8bfa982717eef70 Signed-off-by: Robert Varga --- diff --git a/applications/topology-lldp-discovery/pom.xml b/applications/topology-lldp-discovery/pom.xml index a8989e9c57..7b219285fb 100644 --- a/applications/topology-lldp-discovery/pom.xml +++ b/applications/topology-lldp-discovery/pom.xml @@ -9,7 +9,6 @@ org.opendaylight.openflowplugin.applications topology-lldp-discovery - 0.18.0-SNAPSHOT bundle diff --git a/applications/topology-lldp-discovery/src/main/java/org/opendaylight/openflowplugin/applications/topology/lldp/LLDPLinkAger.java b/applications/topology-lldp-discovery/src/main/java/org/opendaylight/openflowplugin/applications/topology/lldp/LLDPLinkAger.java index c4a67e0292..c4404d9d97 100644 --- a/applications/topology-lldp-discovery/src/main/java/org/opendaylight/openflowplugin/applications/topology/lldp/LLDPLinkAger.java +++ b/applications/topology-lldp-discovery/src/main/java/org/opendaylight/openflowplugin/applications/topology/lldp/LLDPLinkAger.java @@ -19,9 +19,9 @@ import javax.annotation.PreDestroy; import javax.inject.Inject; import javax.inject.Singleton; import org.eclipse.jdt.annotation.NonNull; -import org.opendaylight.mdsal.binding.api.ClusteredDataTreeChangeListener; import org.opendaylight.mdsal.binding.api.DataBroker; import org.opendaylight.mdsal.binding.api.DataObjectModification; +import org.opendaylight.mdsal.binding.api.DataTreeChangeListener; import org.opendaylight.mdsal.binding.api.DataTreeIdentifier; import org.opendaylight.mdsal.binding.api.DataTreeModification; import org.opendaylight.mdsal.binding.api.NotificationPublishService; @@ -47,7 +47,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @Singleton -public final class LLDPLinkAger implements ConfigurationListener, ClusteredDataTreeChangeListener, AutoCloseable { +public final class LLDPLinkAger implements ConfigurationListener, DataTreeChangeListener, AutoCloseable { private static final Logger LOG = LoggerFactory.getLogger(LLDPLinkAger.class); static final String TOPOLOGY_ID = "flow:1"; static final InstanceIdentifier II_TO_LINK = InstanceIdentifier.create(NetworkTopology.class) @@ -79,7 +79,7 @@ public final class LLDPLinkAger implements ConfigurationListener, ClusteredDataT final DataTreeIdentifier dtiToNodeConnector = DataTreeIdentifier.of(LogicalDatastoreType.OPERATIONAL, II_TO_LINK); try { - listenerRegistration = dataBroker.registerDataTreeChangeListener(dtiToNodeConnector, LLDPLinkAger.this); + listenerRegistration = dataBroker.registerTreeChangeListener(dtiToNodeConnector, this); } catch (Exception e) { LOG.error("DataTreeChangeListeners registration failed:", e); throw new IllegalStateException("LLDPLinkAger startup failed!", e); @@ -152,7 +152,7 @@ public final class LLDPLinkAger implements ConfigurationListener, ClusteredDataT } private void processLinkDeleted(final DataObjectModification rootNode) { - Link link = rootNode.getDataBefore(); + Link link = rootNode.dataBefore(); LOG.trace("Removing link {} from linkToDate cache", link); LinkDiscovered linkDiscovered = LLDPDiscoveryUtils.toLLDPLinkDiscovered(link); linkToDate.remove(linkDiscovered);