CodeGenerator update.
[controller.git] / opendaylight / sal / api / src / main / java / org / opendaylight / controller / sal / match / Match.java
index e376ba7a17341c72edd82ce93ca750988ca84f2c..71e0087090334f12c18561e94f7c0fc5f5443126 100644 (file)
@@ -9,12 +9,12 @@
 
 package org.opendaylight.controller.sal.match;
 
+import java.io.Serializable;
 import java.net.Inet4Address;
 import java.net.Inet6Address;
 import java.net.InetAddress;
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
@@ -39,8 +39,9 @@ import org.opendaylight.controller.sal.utils.NetUtils;
  */
 @XmlRootElement
 @XmlAccessorType(XmlAccessType.NONE)
-public class Match implements Cloneable {
-    private static final Map<MatchType, MatchType> reversableMatches;
+public class Match implements Cloneable, Serializable {
+       private static final long serialVersionUID = 1L;
+       private static final Map<MatchType, MatchType> reversableMatches;
     static {
         Map<MatchType, MatchType> map = new HashMap<MatchType, MatchType>();
         map.put(MatchType.DL_SRC, MatchType.DL_DST);
@@ -292,10 +293,8 @@ public class Match implements Cloneable {
                         && filterAddress instanceof Inet4Address) {
                     return true;
                 }
-                InetAddress thisMask = (InetAddress) filter.getField(type)
-                        .getMask();
-                InetAddress filterMask = (InetAddress) filter.getField(type)
-                        .getMask();
+                InetAddress thisMask = (InetAddress) thisField.getMask();
+                InetAddress filterMask = (InetAddress) filterField.getMask();
                 // thisAddress has to be in same subnet of filterAddress
                 if (NetUtils.inetAddressConflict(thisAddress, filterAddress,
                         thisMask, filterMask)) {