X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-dom-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fdom%2Fbroker%2Fimpl%2FDOMRpcRoutingTable.java;h=4c6b6315089ef0c4a8e031bd8fd6355d3ba6df04;hp=0e5ce271e48c755ea1d9f6795ce8d2d85a496ead;hb=8ec73bf853a9b6708b455c0321a585992e02b125;hpb=e3998d55e33da9f6ecb69da75ecc71a047b6362b diff --git a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/DOMRpcRoutingTable.java b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/DOMRpcRoutingTable.java index 0e5ce271e4..4c6b631508 100644 --- a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/DOMRpcRoutingTable.java +++ b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/DOMRpcRoutingTable.java @@ -16,6 +16,7 @@ import com.google.common.collect.ListMultimap; import com.google.common.collect.Maps; import com.google.common.util.concurrent.CheckedFuture; import com.google.common.util.concurrent.Futures; +import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; @@ -81,7 +82,7 @@ final class DOMRpcRoutingTable { // Now iterate over existing entries, modifying them as appropriate... final Builder mb = ImmutableMap.builder(); for (Entry re : this.rpcs.entrySet()) { - List newRpcs = toAdd.removeAll(re.getKey()); + List newRpcs = new ArrayList<>(toAdd.removeAll(re.getKey())); if (!newRpcs.isEmpty()) { final AbstractDOMRpcRoutingTableEntry ne = re.getValue().add(implementation, newRpcs); mb.put(re.getKey(), ne); @@ -115,7 +116,7 @@ final class DOMRpcRoutingTable { // Now iterate over existing entries, modifying them as appropriate... final Builder b = ImmutableMap.builder(); for (Entry e : this.rpcs.entrySet()) { - final List removed = toRemove.removeAll(e.getKey()); + final List removed = new ArrayList<>(toRemove.removeAll(e.getKey())); if (!removed.isEmpty()) { final AbstractDOMRpcRoutingTableEntry ne = e.getValue().remove(implementation, removed); if (ne != null) { @@ -163,7 +164,7 @@ final class DOMRpcRoutingTable { for (DataSchemaNode c : input.getChildNodes()) { for (UnknownSchemaNode extension : c.getUnknownSchemaNodes()) { if (CONTEXT_REFERENCE.equals(extension.getNodeType())) { - final YangInstanceIdentifier keyId = YangInstanceIdentifier.builder().node(input.getQName()).node(c.getQName()).build(); + final YangInstanceIdentifier keyId = YangInstanceIdentifier.of(c.getQName()); return new RoutedDOMRpcRoutingTableEntry(rpcDef, keyId, implementations); } }