X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-dom-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fdom%2Fbroker%2Fimpl%2FDOMRpcRoutingTable.java;h=7c070fdbd1ddefd0d6feb19b79c1698273231330;hb=03e639ec0e4b1b2a55a8763b5642b1118e52861c;hp=0e5ce271e48c755ea1d9f6795ce8d2d85a496ead;hpb=3927509ec3ecfa32a51b725d2b7155d425f5b877;p=controller.git 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..7c070fdbd1 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.builder().node(c.getQName()).build(); return new RoutedDOMRpcRoutingTableEntry(rpcDef, keyId, implementations); } }