BUG-865: remove use of DefaultDataTreeCandidate 51/27051/1
authorRobert Varga <rovarga@cisco.com>
Wed, 16 Sep 2015 12:52:03 +0000 (14:52 +0200)
committerRobert Varga <rovarga@cisco.com>
Wed, 16 Sep 2015 12:52:03 +0000 (14:52 +0200)
The functionality is available via utility method in DataTreeCandidates,
so use that instead.

Change-Id: I44bab58e39ad226c198f3ada1140152be1e4b4aa
Signed-off-by: Robert Varga <rovarga@cisco.com>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardDataTreeChangePublisher.java

index 5e24dcd1823c16fd7e4903ee87321380e03db0e8..c1555b32575fab1829e2c9f58b4bc7d6f6ca5809 100644 (file)
@@ -14,8 +14,8 @@ import org.opendaylight.controller.md.sal.dom.spi.AbstractDOMDataTreeChangeListe
 import org.opendaylight.controller.sal.core.spi.data.AbstractDOMStoreTreeChangePublisher;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidate;
+import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidates;
 import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidateNode;
-import org.opendaylight.yangtools.yang.data.api.schema.tree.spi.DefaultDataTreeCandidate;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -30,7 +30,8 @@ final class ShardDataTreeChangePublisher extends AbstractDOMStoreTreeChangePubli
     @Override
     protected void notifyListeners(final Collection<AbstractDOMDataTreeChangeListenerRegistration<?>> registrations,
             final YangInstanceIdentifier path, final DataTreeCandidateNode node) {
-        final Collection<DataTreeCandidate> changes = Collections.<DataTreeCandidate>singleton(new DefaultDataTreeCandidate(path, node));
+        final Collection<DataTreeCandidate> changes = Collections.<DataTreeCandidate>singleton(
+                DataTreeCandidates.newDataTreeCandidate(path, node));
 
         for (AbstractDOMDataTreeChangeListenerRegistration<?> reg : registrations) {
             reg.getInstance().onDataTreeChanged(changes);