From: Robert Varga Date: Mon, 29 Jan 2024 15:58:01 +0000 (+0100) Subject: Clean up callhome-provide warnings X-Git-Tag: v7.0.0~80 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=06f50309925e418d43e16ac9731ba9d723567212;p=netconf.git Clean up callhome-provide warnings We have a few warnings from upstreams, fix them up. Change-Id: I97235589a17d315f5e183e9f4f2b1b9daa7f9aef Signed-off-by: Robert Varga --- diff --git a/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/CallHomeMountStatusReporter.java b/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/CallHomeMountStatusReporter.java index c741272697..d279ff90f0 100644 --- a/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/CallHomeMountStatusReporter.java +++ b/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/CallHomeMountStatusReporter.java @@ -13,7 +13,6 @@ import com.google.common.util.concurrent.MoreExecutors; import java.io.IOException; import java.net.SocketAddress; import java.security.PublicKey; -import java.util.Collection; import java.util.List; import java.util.concurrent.ExecutionException; import javax.annotation.PreDestroy; @@ -61,7 +60,7 @@ public final class CallHomeMountStatusReporter implements CallHomeStatusRecorder public CallHomeMountStatusReporter(final @Reference DataBroker broker) { dataBroker = broker; syncReg = dataBroker.registerDataTreeChangeListener( - DataTreeIdentifier.create(LogicalDatastoreType.CONFIGURATION, ALL_DEVICES_II.child(Device.class)), + DataTreeIdentifier.of(LogicalDatastoreType.CONFIGURATION, ALL_DEVICES_II.child(Device.class)), this::onConfigurationDataTreeChanged); } @@ -178,18 +177,18 @@ public final class CallHomeMountStatusReporter implements CallHomeStatusRecorder // DataTreeChangeListener dedicated to call-home device data synchronization // from CONFIGURATION to OPERATIONAL datastore (excluding device status) - private void onConfigurationDataTreeChanged(final Collection> changes) { + private void onConfigurationDataTreeChanged(final List> changes) { final var deleted = ImmutableList.>builder(); final var modified = ImmutableList.builder(); for (var change : changes) { var changeRootNode = change.getRootNode(); - switch (changeRootNode.getModificationType()) { + switch (changeRootNode.modificationType()) { case SUBTREE_MODIFIED: case WRITE: - modified.add(changeRootNode.getDataAfter()); + modified.add(changeRootNode.dataAfter()); break; case DELETE: - deleted.add(change.getRootPath().getRootIdentifier()); + deleted.add(change.getRootPath().path()); break; default: break;