Add test for generated code checking list of dependencies.
[controller.git] / opendaylight / forwardingrulesmanager / api / src / main / java / org / opendaylight / controller / forwardingrulesmanager / FlowEntry.java
index e86e0186c61544b73763ff2fa3edc877ce14c5f7..83106a391cb7bdc00ff0911fa703e7dee1c1c2f4 100644 (file)
@@ -168,14 +168,13 @@ public class FlowEntry implements Cloneable, Serializable {
     public FlowEntry mergeWith(ContainerFlow containerFlow) {
         Match myMatch = flow.getMatch();
 
-        // Based on this flow direction, rearrange the match
-        Match match = containerFlow.getMatch();
+        Match filter = containerFlow.getMatch();
 
         // Merge
-        myMatch.mergeWithFilter(match);
+        Match merge = myMatch.mergeWithFilter(filter);
 
         // Replace this Flow's match with merged version
-        flow.setMatch(myMatch);
+        flow.setMatch(merge);
 
         return this;
     }
@@ -187,6 +186,7 @@ public class FlowEntry implements Cloneable, Serializable {
      * @return true if internal generated static flow, false otherwise
      */
     public boolean isInternal() {
-        return flowName.startsWith(FlowConfig.internalStaticFlowBegin);
+        return flowName.startsWith(FlowConfig.INTERNALSTATICFLOWBEGIN)
+                && flowName.endsWith(FlowConfig.INTERNALSTATICFLOWEND);
     }
 }