Optimize use of YangInstanceIdentifier.getPathArguments()
[controller.git] / opendaylight / md-sal / sal-dom-spi / src / main / java / org / opendaylight / controller / sal / core / spi / data / AbstractDOMStoreTreeChangePublisher.java
index d191fc397c787ff4120269f7fbdf8c54b24d19ff..bf07daeaaac2c421b4aea5f2ba3532b64f620249 100644 (file)
@@ -7,7 +7,6 @@
  */
 package org.opendaylight.controller.sal.core.spi.data;
 
-import com.google.common.collect.ImmutableList;
 import java.util.Collection;
 import java.util.List;
 import javax.annotation.Nonnull;
@@ -63,8 +62,7 @@ public abstract class AbstractDOMStoreTreeChangePublisher extends AbstractRegist
         }
 
         try (final RegistrationTreeSnapshot<AbstractDOMDataTreeChangeListenerRegistration<?>> snapshot = takeSnapshot()) {
-            final List<PathArgument> toLookup = ImmutableList.copyOf(candidate.getRootPath().getPathArguments());
-            lookupAndNotify(toLookup, 0, snapshot.getRootNode(), candidate);
+            lookupAndNotify(candidate.getRootPath().getPathArguments(), 0, snapshot.getRootNode(), candidate);
         }
     }