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 {
* @see java.lang.Object#equals(java.lang.Object)
*/
public int hashCode() {
return Objects.hash(deviceId, selector, priority, tableId, payLoad);
return Objects.hash(deviceId, selector, tableId, payLoad);
}
public int hash() {
return Objects.hash(deviceId, selector, treatment, tableId, payLoad);
//FIXME do we need this method in addition to hashCode()?
private int hash() {
return Objects.hash(deviceId, selector, tableId, payLoad);
}
@Override
......
......@@ -215,7 +215,7 @@ public class OpenFlowDeviceProvider extends AbstractProvider implements DevicePr
for (OFPortStatsEntry entry : entries) {
try {
if (entry.getPortNo().getPortNumber() < 0) {
if (entry.getPortNo() == null || entry.getPortNo().getPortNumber() < 0) {
continue;
}
DefaultPortStatistics.Builder builder = DefaultPortStatistics.builder();
......