-
- final List<FlowAndStatisticsMapList> statsListPart = flowStatsConvertor.toSALFlowStatsList(replyBody.getFlowStats(), getDatapathId(), getOfVersion());
-
- for (final FlowAndStatisticsMapList part : statsListPart) {
- final org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.FlowId flowId =
- new org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.FlowId(generateFlowId(part).getValue());
-
- statsList.add(new FlowAndStatisticsMapListBuilder(part)
- .setKey(new FlowAndStatisticsMapListKey(flowId))
- .setFlowId(flowId)
- .build());
+ final Optional<List<FlowAndStatisticsMapList>> statsListPart = getConvertorExecutor().convert(
+ replyBody.getFlowStats(), data);
+
+ if (statsListPart.isPresent()) {
+ for (final FlowAndStatisticsMapList part : statsListPart.get()) {
+ final org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.FlowId flowId =
+ new org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.FlowId(generateFlowId(part).getValue());
+
+ statsList.add(new FlowAndStatisticsMapListBuilder(part)
+ .setKey(new FlowAndStatisticsMapListKey(flowId))
+ .setFlowId(flowId)
+ .build());
+ }