X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fforwardingrulesmanager%2Fapi%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fforwardingrulesmanager%2FFlowEntry.java;h=d9a0891c2ad812b855641c48155235633328ff51;hb=fe5ef8066b0dd57df46e5b8806020ceb41716efb;hp=e86e0186c61544b73763ff2fa3edc877ce14c5f7;hpb=b8bb7db7c6133e00046e85ead70426eb1e05184d;p=controller.git diff --git a/opendaylight/forwardingrulesmanager/api/src/main/java/org/opendaylight/controller/forwardingrulesmanager/FlowEntry.java b/opendaylight/forwardingrulesmanager/api/src/main/java/org/opendaylight/controller/forwardingrulesmanager/FlowEntry.java index e86e0186c6..d9a0891c2a 100644 --- a/opendaylight/forwardingrulesmanager/api/src/main/java/org/opendaylight/controller/forwardingrulesmanager/FlowEntry.java +++ b/opendaylight/forwardingrulesmanager/api/src/main/java/org/opendaylight/controller/forwardingrulesmanager/FlowEntry.java @@ -122,7 +122,7 @@ public class FlowEntry implements Cloneable, Serializable { } if (flow == null) { - return (other.flow == null) ? true : false; + return other.flow == null; } else if (other.flow == null) { return false; } @@ -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); } }