Clean up callhome-provide warnings 80/110080/1
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 29 Jan 2024 15:58:01 +0000 (16:58 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 29 Jan 2024 15:58:01 +0000 (16:58 +0100)
We have a few warnings from upstreams, fix them up.

Change-Id: I97235589a17d315f5e183e9f4f2b1b9daa7f9aef
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/CallHomeMountStatusReporter.java

index c7412726973a2fe891eb2fee7d2f53567a337c94..d279ff90f0b9047ea6b853e91f32cb084a1ae174 100644 (file)
@@ -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<DataTreeModification<Device>> changes) {
+    private void onConfigurationDataTreeChanged(final List<DataTreeModification<Device>> changes) {
         final var deleted = ImmutableList.<InstanceIdentifier<Device>>builder();
         final var modified = ImmutableList.<Device>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;