Thomas Vachuska

Fixed ONOS-2051 by eliminating treatment and priority from flow id/cookie.

FIxed NPE in port stats collection.

Change-Id: I30954d31c39be959e84fa74f1c4e781d5767f303
...@@ -330,11 +330,12 @@ public class DefaultFlowRule implements FlowRule { ...@@ -330,11 +330,12 @@ public class DefaultFlowRule implements FlowRule {
330 * @see java.lang.Object#equals(java.lang.Object) 330 * @see java.lang.Object#equals(java.lang.Object)
331 */ 331 */
332 public int hashCode() { 332 public int hashCode() {
333 - return Objects.hash(deviceId, selector, priority, tableId, payLoad); 333 + return Objects.hash(deviceId, selector, tableId, payLoad);
334 } 334 }
335 335
336 - public int hash() { 336 + //FIXME do we need this method in addition to hashCode()?
337 - return Objects.hash(deviceId, selector, treatment, tableId, payLoad); 337 + private int hash() {
338 + return Objects.hash(deviceId, selector, tableId, payLoad);
338 } 339 }
339 340
340 @Override 341 @Override
......
...@@ -215,7 +215,7 @@ public class OpenFlowDeviceProvider extends AbstractProvider implements DevicePr ...@@ -215,7 +215,7 @@ public class OpenFlowDeviceProvider extends AbstractProvider implements DevicePr
215 215
216 for (OFPortStatsEntry entry : entries) { 216 for (OFPortStatsEntry entry : entries) {
217 try { 217 try {
218 - if (entry.getPortNo().getPortNumber() < 0) { 218 + if (entry.getPortNo() == null || entry.getPortNo().getPortNumber() < 0) {
219 continue; 219 continue;
220 } 220 }
221 DefaultPortStatistics.Builder builder = DefaultPortStatistics.builder(); 221 DefaultPortStatistics.Builder builder = DefaultPortStatistics.builder();
......