X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fsal%2Fapi%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fmatch%2FMatch.java;h=4dcf2b3c3764790e3aab70da16512573b8c3975a;hb=84ca16196357ad899e00eceae27ef75eaf899d14;hp=00a2f57308d57e1d76c8f0e88aeb86d74a3f910a;hpb=39e1d43dc8f41f682fb818469a3aeb542e76ea8e;p=controller.git diff --git a/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/match/Match.java b/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/match/Match.java index 00a2f57308..4dcf2b3c37 100644 --- a/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/match/Match.java +++ b/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/match/Match.java @@ -225,13 +225,14 @@ public class Match implements Cloneable, Serializable { Match reverse = this.clone(); // Flip symmetric fields - for (Map.Entry entry : Match.reversableMatches - .entrySet()) { + for (Map.Entry entry : Match.reversableMatches.entrySet()) { MatchType from = entry.getKey(); MatchType to = entry.getValue(); if (this.isPresent(from)) { - reverse.setField(to, this.getField(from).getValue(), this - .getField(from).getMask()); + reverse.setField(to, this.getField(from).getValue(), this.getField(from).getMask()); + if (!this.isPresent(to)) { + reverse.clearField(from); + } } }