alshabib

fix for flow collisions

Change-Id: I07623fa06a5dbc1f36da021261f494f968fdf2f9
...@@ -161,7 +161,7 @@ public final class Criteria { ...@@ -161,7 +161,7 @@ public final class Criteria {
161 161
162 @Override 162 @Override
163 public int hashCode() { 163 public int hashCode() {
164 - return Objects.hash(port); 164 + return Objects.hash(port, type());
165 } 165 }
166 166
167 @Override 167 @Override
...@@ -171,7 +171,8 @@ public final class Criteria { ...@@ -171,7 +171,8 @@ public final class Criteria {
171 } 171 }
172 if (obj instanceof PortCriterion) { 172 if (obj instanceof PortCriterion) {
173 PortCriterion that = (PortCriterion) obj; 173 PortCriterion that = (PortCriterion) obj;
174 - return Objects.equals(port, that.port); 174 + return Objects.equals(port, that.port) &&
175 + Objects.equals(this.type(), that.type());
175 176
176 } 177 }
177 return false; 178 return false;
...@@ -252,7 +253,7 @@ public final class Criteria { ...@@ -252,7 +253,7 @@ public final class Criteria {
252 253
253 @Override 254 @Override
254 public int hashCode() { 255 public int hashCode() {
255 - return Objects.hash(ethType); 256 + return Objects.hash(ethType, type());
256 } 257 }
257 258
258 @Override 259 @Override
...@@ -262,7 +263,8 @@ public final class Criteria { ...@@ -262,7 +263,8 @@ public final class Criteria {
262 } 263 }
263 if (obj instanceof EthTypeCriterion) { 264 if (obj instanceof EthTypeCriterion) {
264 EthTypeCriterion that = (EthTypeCriterion) obj; 265 EthTypeCriterion that = (EthTypeCriterion) obj;
265 - return Objects.equals(ethType, that.ethType); 266 + return Objects.equals(ethType, that.ethType) &&
267 + Objects.equals(this.type(), that.type());
266 268
267 269
268 } 270 }
...@@ -345,7 +347,7 @@ public final class Criteria { ...@@ -345,7 +347,7 @@ public final class Criteria {
345 347
346 @Override 348 @Override
347 public int hashCode() { 349 public int hashCode() {
348 - return Objects.hash(proto); 350 + return Objects.hash(proto, type());
349 } 351 }
350 352
351 @Override 353 @Override
...@@ -400,7 +402,8 @@ public final class Criteria { ...@@ -400,7 +402,8 @@ public final class Criteria {
400 } 402 }
401 if (obj instanceof VlanPcpCriterion) { 403 if (obj instanceof VlanPcpCriterion) {
402 VlanPcpCriterion that = (VlanPcpCriterion) obj; 404 VlanPcpCriterion that = (VlanPcpCriterion) obj;
403 - return Objects.equals(vlanPcp, that.vlanPcp); 405 + return Objects.equals(vlanPcp, that.vlanPcp) &&
406 + Objects.equals(this.type(), that.type());
404 407
405 408
406 } 409 }
...@@ -436,7 +439,7 @@ public final class Criteria { ...@@ -436,7 +439,7 @@ public final class Criteria {
436 439
437 @Override 440 @Override
438 public int hashCode() { 441 public int hashCode() {
439 - return Objects.hash(vlanId); 442 + return Objects.hash(vlanId, type());
440 } 443 }
441 444
442 @Override 445 @Override
...@@ -446,7 +449,8 @@ public final class Criteria { ...@@ -446,7 +449,8 @@ public final class Criteria {
446 } 449 }
447 if (obj instanceof VlanIdCriterion) { 450 if (obj instanceof VlanIdCriterion) {
448 VlanIdCriterion that = (VlanIdCriterion) obj; 451 VlanIdCriterion that = (VlanIdCriterion) obj;
449 - return Objects.equals(vlanId, that.vlanId); 452 + return Objects.equals(vlanId, that.vlanId) &&
453 + Objects.equals(this.type(), that.type());
450 454
451 455
452 } 456 }
......
...@@ -78,7 +78,7 @@ public abstract class L2ModificationInstruction implements Instruction { ...@@ -78,7 +78,7 @@ public abstract class L2ModificationInstruction implements Instruction {
78 78
79 @Override 79 @Override
80 public int hashCode() { 80 public int hashCode() {
81 - return Objects.hash(mac, subtype); 81 + return Objects.hash(mac, type(), subtype);
82 } 82 }
83 83
84 @Override 84 @Override
...@@ -89,6 +89,7 @@ public abstract class L2ModificationInstruction implements Instruction { ...@@ -89,6 +89,7 @@ public abstract class L2ModificationInstruction implements Instruction {
89 if (obj instanceof ModEtherInstruction) { 89 if (obj instanceof ModEtherInstruction) {
90 ModEtherInstruction that = (ModEtherInstruction) obj; 90 ModEtherInstruction that = (ModEtherInstruction) obj;
91 return Objects.equals(mac, that.mac) && 91 return Objects.equals(mac, that.mac) &&
92 + Objects.equals(this.type(), that.type()) &&
92 Objects.equals(subtype, that.subtype); 93 Objects.equals(subtype, that.subtype);
93 94
94 } 95 }
...@@ -126,7 +127,7 @@ public abstract class L2ModificationInstruction implements Instruction { ...@@ -126,7 +127,7 @@ public abstract class L2ModificationInstruction implements Instruction {
126 127
127 @Override 128 @Override
128 public int hashCode() { 129 public int hashCode() {
129 - return Objects.hash(vlanId, subtype()); 130 + return Objects.hash(vlanId, type(), subtype());
130 } 131 }
131 132
132 @Override 133 @Override
...@@ -136,7 +137,9 @@ public abstract class L2ModificationInstruction implements Instruction { ...@@ -136,7 +137,9 @@ public abstract class L2ModificationInstruction implements Instruction {
136 } 137 }
137 if (obj instanceof ModVlanIdInstruction) { 138 if (obj instanceof ModVlanIdInstruction) {
138 ModVlanIdInstruction that = (ModVlanIdInstruction) obj; 139 ModVlanIdInstruction that = (ModVlanIdInstruction) obj;
139 - return Objects.equals(vlanId, that.vlanId); 140 + return Objects.equals(vlanId, that.vlanId) &&
141 + Objects.equals(this.type(), that.type()) &&
142 + Objects.equals(this.subtype(), that.subtype());
140 143
141 } 144 }
142 return false; 145 return false;
...@@ -173,7 +176,7 @@ public abstract class L2ModificationInstruction implements Instruction { ...@@ -173,7 +176,7 @@ public abstract class L2ModificationInstruction implements Instruction {
173 176
174 @Override 177 @Override
175 public int hashCode() { 178 public int hashCode() {
176 - return Objects.hash(vlanPcp, subtype()); 179 + return Objects.hash(vlanPcp, type(), subtype());
177 } 180 }
178 181
179 @Override 182 @Override
...@@ -183,7 +186,9 @@ public abstract class L2ModificationInstruction implements Instruction { ...@@ -183,7 +186,9 @@ public abstract class L2ModificationInstruction implements Instruction {
183 } 186 }
184 if (obj instanceof ModVlanPcpInstruction) { 187 if (obj instanceof ModVlanPcpInstruction) {
185 ModVlanPcpInstruction that = (ModVlanPcpInstruction) obj; 188 ModVlanPcpInstruction that = (ModVlanPcpInstruction) obj;
186 - return Objects.equals(vlanPcp, that.vlanPcp); 189 + return Objects.equals(vlanPcp, that.vlanPcp) &&
190 + Objects.equals(this.type(), that.type()) &&
191 + Objects.equals(this.subtype(), that.subtype());
187 192
188 } 193 }
189 return false; 194 return false;
......
...@@ -70,7 +70,7 @@ public abstract class L3ModificationInstruction implements Instruction { ...@@ -70,7 +70,7 @@ public abstract class L3ModificationInstruction implements Instruction {
70 70
71 @Override 71 @Override
72 public int hashCode() { 72 public int hashCode() {
73 - return Objects.hash(ip, subtype()); 73 + return Objects.hash(ip, type(), subtype());
74 } 74 }
75 75
76 @Override 76 @Override
...@@ -80,7 +80,9 @@ public abstract class L3ModificationInstruction implements Instruction { ...@@ -80,7 +80,9 @@ public abstract class L3ModificationInstruction implements Instruction {
80 } 80 }
81 if (obj instanceof ModIPInstruction) { 81 if (obj instanceof ModIPInstruction) {
82 ModIPInstruction that = (ModIPInstruction) obj; 82 ModIPInstruction that = (ModIPInstruction) obj;
83 - return Objects.equals(ip, that.ip); 83 + return Objects.equals(ip, that.ip) &&
84 + Objects.equals(this.type(), that.type()) &&
85 + Objects.equals(this.subtype(), that.subtype());
84 86
85 } 87 }
86 return false; 88 return false;
......