From 06416ac9523c6d783574a10d7627aa582ff760f8 Mon Sep 17 00:00:00 2001 From: Asad Ahmed Date: Thu, 16 Jan 2014 15:58:52 -0800 Subject: [PATCH] In the method to get flow stats for a particular match, the match from the stats can be null. Taking care of that in this commit. Change-Id: If5aab0840f42ea662a7018695e04a93e6fa984ba Signed-off-by: Asad Ahmed --- .../openflow/internal/OFStatisticsManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/OFStatisticsManager.java b/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/OFStatisticsManager.java index 8a86d2f256..27a7ae6ffb 100644 --- a/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/OFStatisticsManager.java +++ b/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/OFStatisticsManager.java @@ -748,7 +748,7 @@ public class OFStatisticsManager implements IOFStatisticsManager, IInventoryShim for (OFStatistics stats : targetList) { V6StatsReply v6Stats = (V6StatsReply) stats; V6Match v6Match = v6Stats.getMatch(); - if (v6Stats.getPriority() == priority && v6Match.equals(targetMatch)) { + if (v6Stats.getPriority() == priority && targetMatch.equals(v6Match)) { List list = new ArrayList(); list.add(stats); return list; @@ -757,7 +757,7 @@ public class OFStatisticsManager implements IOFStatisticsManager, IInventoryShim } else { for (OFStatistics stats : statsList) { OFFlowStatisticsReply flowStats = (OFFlowStatisticsReply) stats; - if (flowStats.getPriority() == priority && flowStats.getMatch().equals(ofMatch)) { + if (flowStats.getPriority() == priority && ofMatch.equals(flowStats.getMatch())) { List list = new ArrayList(); list.add(stats); return list; -- 2.36.6