Remove use of deprecated addAugmentation() 81/89481/2
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 28 Apr 2020 07:09:28 +0000 (09:09 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 28 Apr 2020 08:05:55 +0000 (10:05 +0200)
The two-argument variant has been removed, do not use it.

Change-Id: Iae92f7215994dd46f237284acd295eb37c5f2950
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/md-sal/sal-cluster-admin-impl/src/main/java/org/opendaylight/controller/cluster/datastore/admin/ClusterAdminRpcService.java
opendaylight/md-sal/sal-test-model/src/main/java/org/opendaylight/controller/md/sal/test/model/util/ListsBindingUtils.java

index 6102db5..b5fb0c1 100644 (file)
@@ -105,7 +105,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controll
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.cluster.admin.rev151013.RemoveShardReplicaInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.cluster.admin.rev151013.RemoveShardReplicaOutput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.cluster.admin.rev151013.RemoveShardReplicaOutputBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.cluster.admin.rev151013.get.known.clients._for.all.shards.output.ShardResult1;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.cluster.admin.rev151013.get.known.clients._for.all.shards.output.ShardResult1Builder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.cluster.admin.rev151013.get.known.clients._for.all.shards.output.shard.result.KnownClients;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.cluster.admin.rev151013.get.known.clients._for.all.shards.output.shard.result.KnownClientsBuilder;
@@ -674,7 +673,7 @@ public class ClusterAdminRpcService implements ClusterAdminService {
 
             final ShardResult sr = builder
                     .setSucceeded(Boolean.TRUE)
-                    .addAugmentation(ShardResult1.class, new ShardResult1Builder()
+                    .addAugmentation(new ShardResult1Builder()
                         .setKnownClients(reply.getClients().stream()
                             .map(client -> new KnownClientsBuilder()
                                 .setMember(client.getFrontendId().getMemberName().toYang())
index 1f379fd..726b2a6 100644 (file)
@@ -67,9 +67,11 @@ public final class ListsBindingUtils {
     }
 
     public static TopLevelList topLevelList(final TopLevelListKey key, final TreeComplexUsesAugment augment) {
-        TopLevelListBuilder builder = new TopLevelListBuilder().withKey(key);
-        builder.addAugmentation(TreeComplexUsesAugment.class, augment);
-        return builder.build();
+        final TopLevelListBuilder builder = new TopLevelListBuilder();
+        if (augment != null) {
+            builder.addAugmentation(augment);
+        }
+        return builder.withKey(key).build();
     }
 
     public static TreeComplexUsesAugment complexUsesAugment(final ListViaUsesKey... keys) {

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.