Squash registrations 40/93040/1
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 14 Oct 2020 09:42:07 +0000 (11:42 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 14 Oct 2020 09:42:07 +0000 (11:42 +0200)
Use a minimally-sized List instead of default allocation.

Change-Id: I58ce1082a96d546d66ce4ca59df14c20b2bc9d2a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
netconf/netconf-topology/src/main/java/org/opendaylight/netconf/topology/spi/AbstractNetconfTopology.java

index d52010e4ee6856fbea45e8fc1a1df23ca66a5c87..c132a2d9cde6058c6f61c0d6c4974280758dcf72 100644 (file)
@@ -304,7 +304,7 @@ public abstract class AbstractNetconfTopology implements NetconfTopology {
                         PotentialSchemaSource.create(entry.getKey(), YangTextSchemaSource.class,
                             PotentialSchemaSource.Costs.REMOTE_IO.getValue())));
                 }
-                return registrations;
+                return List.copyOf(registrations);
             }
         }