Merge "Fix collateral caused by split of UserManager in api and implementation"
authorMadhu Venugopal <vmadhu@cisco.com>
Wed, 19 Jun 2013 03:40:42 +0000 (03:40 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Wed, 19 Jun 2013 03:40:42 +0000 (03:40 +0000)
opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/match/Match.java

index 00a2f57308d57e1d76c8f0e88aeb86d74a3f910a..4dcf2b3c3764790e3aab70da16512573b8c3975a 100644 (file)
@@ -225,13 +225,14 @@ public class Match implements Cloneable, Serializable {
         Match reverse = this.clone();
 
         // Flip symmetric fields
-        for (Map.Entry<MatchType, MatchType> entry : Match.reversableMatches
-                .entrySet()) {
+        for (Map.Entry<MatchType, MatchType> 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);
+                }
             }
         }