Improve InitialFlowWriter
[l2switch.git] / arphandler / src / main / java / org / opendaylight / l2switch / arphandler / flow / InitialFlowWriter.java
index 0ea1c5647995bd002ce20cdddf08410d577fce6f..7a52a1e310c80543044c558c756323a72da9b894 100644 (file)
@@ -129,11 +129,10 @@ public class InitialFlowWriter implements DataTreeChangeListener<Node> {
         Set<InstanceIdentifier<?>> nodeIds = new HashSet<>();
         for (DataTreeModification<Node> change: changes) {
             DataObjectModification<Node> rootNode = change.getRootNode();
-            final InstanceIdentifier<Node> identifier = change.getRootPath().getRootIdentifier();
             switch (rootNode.getModificationType()) {
                 case WRITE:
                     if (rootNode.getDataBefore() == null) {
-                        nodeIds.add(identifier);
+                        nodeIds.add(change.getRootPath().getRootIdentifier());
                     }
                     break;
                 default: