Merge "Fixed Group and meter id bugs"
[controller.git] / opendaylight / protocol_plugins / openflow / src / main / java / org / opendaylight / controller / protocol_plugin / openflow / internal / TableStatisticsConverter.java
index 993f8976fc6299fc3d0bece5d49da0d30432c64d..35a763869b20f2e73c2c773d748930970212820c 100644 (file)
@@ -8,6 +8,7 @@
 package org.opendaylight.controller.protocol_plugin.openflow.internal;
 
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
 
 import org.opendaylight.controller.sal.core.Node;
@@ -33,7 +34,7 @@ public class TableStatisticsConverter {
     public TableStatisticsConverter(long switchId, List<OFStatistics> statsList) {
         this.switchId = switchId;
         if (statsList == null || statsList.isEmpty()) {
-            this.ofStatsList = new ArrayList<OFStatistics>(1); // dummy list
+            this.ofStatsList = Collections.emptyList();
         } else {
             this.ofStatsList = new ArrayList<OFStatistics>(statsList);
         }
@@ -53,6 +54,7 @@ public class TableStatisticsConverter {
                 ntStat.setActiveCount(ofTableStat.getActiveCount());
                 ntStat.setLookupCount(ofTableStat.getLookupCount());
                 ntStat.setMatchedCount(ofTableStat.getMatchedCount());
+                ntStat.setMaximumEntries(ofTableStat.getMaximumEntries());
                 this.ntStatsList.add(ntStat);
             }
         }