Bump odlparent to 5.0.0
[openflowplugin.git] / applications / of-switch-config-pusher / src / main / java / org / opendaylight / openflowplugin / openflow / ofswitch / config / DefaultConfigPusher.java
index 9ae9e180fac55690dc89843201a35557afb9bb58..f6fca45e8ac96694cf2c4fcf8b4c8e376b3e1df5 100644 (file)
@@ -11,19 +11,18 @@ package org.opendaylight.openflowplugin.openflow.ofswitch.config;
 import com.google.common.base.Preconditions;
 import java.util.Collection;
 import java.util.concurrent.Future;
-import javax.annotation.Nonnull;
 import javax.annotation.PostConstruct;
 import javax.annotation.PreDestroy;
 import javax.inject.Inject;
 import javax.inject.Singleton;
 import org.apache.aries.blueprint.annotation.service.Reference;
-import org.opendaylight.controller.md.sal.binding.api.ClusteredDataTreeChangeListener;
-import org.opendaylight.controller.md.sal.binding.api.DataBroker;
-import org.opendaylight.controller.md.sal.binding.api.DataObjectModification.ModificationType;
-import org.opendaylight.controller.md.sal.binding.api.DataTreeIdentifier;
-import org.opendaylight.controller.md.sal.binding.api.DataTreeModification;
-import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
 import org.opendaylight.infrautils.utils.concurrent.JdkFutures;
+import org.opendaylight.mdsal.binding.api.ClusteredDataTreeChangeListener;
+import org.opendaylight.mdsal.binding.api.DataBroker;
+import org.opendaylight.mdsal.binding.api.DataObjectModification.ModificationType;
+import org.opendaylight.mdsal.binding.api.DataTreeIdentifier;
+import org.opendaylight.mdsal.binding.api.DataTreeModification;
+import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.openflowplugin.api.OFConstants;
 import org.opendaylight.openflowplugin.applications.deviceownershipservice.DeviceOwnershipService;
 import org.opendaylight.openflowplugin.common.wait.SimpleTaskRetryLooper;
@@ -66,13 +65,13 @@ public class DefaultConfigPusher implements AutoCloseable, ClusteredDataTreeChan
         try {
             final InstanceIdentifier<FlowCapableNode> path = InstanceIdentifier.create(Nodes.class).child(Node.class)
                     .augmentation(FlowCapableNode.class);
-            final DataTreeIdentifier<FlowCapableNode> identifier = new DataTreeIdentifier<>(
+            final DataTreeIdentifier<FlowCapableNode> identifier = DataTreeIdentifier.create(
                     LogicalDatastoreType.OPERATIONAL, path);
             final SimpleTaskRetryLooper looper = new SimpleTaskRetryLooper(STARTUP_LOOP_TICK, STARTUP_LOOP_MAX_RETRIES);
             listenerRegistration = looper.loopUntilNoException(
                 () -> dataBroker.registerDataTreeChangeListener(identifier, DefaultConfigPusher.this));
         } catch (Exception e) {
-            LOG.error("DataTreeChangeListener registration failed: {}", e);
+            LOG.error("DataTreeChangeListener registration failed", e);
             throw new IllegalStateException("DefaultConfigPusher startup failed!", e);
         }
         LOG.info("DefaultConfigPusher has started.");
@@ -87,7 +86,7 @@ public class DefaultConfigPusher implements AutoCloseable, ClusteredDataTreeChan
     }
 
     @Override
-    public void onDataTreeChanged(@Nonnull final Collection<DataTreeModification<FlowCapableNode>> modifications) {
+    public void onDataTreeChanged(final Collection<DataTreeModification<FlowCapableNode>> modifications) {
         for (DataTreeModification<FlowCapableNode> modification : modifications) {
             if (modification.getRootNode().getModificationType() == ModificationType.WRITE) {
                 String nodeId = modification.getRootPath().getRootIdentifier()