commit | 4e6025e48e103731d13850991e2ddb9e102b3a0d | [log] [tgz] |
---|---|---|
author | Thomas Vachuska <tom@onlab.us> | Wed Jun 03 11:25:21 2015 -0700 |
committer | Thomas Vachuska <tom@onlab.us> | Wed Jun 03 11:25:21 2015 -0700 |
tree | 41981a216b3591b2badd59b05884e5a3c4b394c8 | |
parent | ea8421291a34b4873ef6d47c2923a8cd3ea626c4 [diff] |
Fixed potential NPE in port-stats. Change-Id: Id3cc83b0ca914223f2cf267605c29cc2093c313f
diff --git a/providers/openflow/device/src/main/java/org/onosproject/provider/of/device/impl/OpenFlowDeviceProvider.java b/providers/openflow/device/src/main/java/org/onosproject/provider/of/device/impl/OpenFlowDeviceProvider.java index 9844f15..7ae6db1 100644 --- a/providers/openflow/device/src/main/java/org/onosproject/provider/of/device/impl/OpenFlowDeviceProvider.java +++ b/providers/openflow/device/src/main/java/org/onosproject/provider/of/device/impl/OpenFlowDeviceProvider.java
@@ -215,7 +215,7 @@ for (OFPortStatsEntry entry : entries) { try { - if (entry.getPortNo() == null || entry.getPortNo().getPortNumber() < 0) { + if (entry == null || entry.getPortNo() == null || entry.getPortNo().getPortNumber() < 0) { continue; } DefaultPortStatistics.Builder builder = DefaultPortStatistics.builder();