Fix ConcorrentModifcationException in statistics map

Change-Id: I46746afccb0d49277d365589fa7ae550b7c2acb1
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 2c83fd6..bfc4e5f 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
@@ -121,6 +121,7 @@
 import org.slf4j.Logger;
 
 import com.google.common.base.Strings;
+import com.google.common.collect.ImmutableList;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
 import com.google.common.collect.Sets;
@@ -313,7 +314,8 @@
 
     private void pushPortMetrics(Dpid dpid, List<OFPortStatsEntry> portStatsEntries) {
         DeviceId deviceId = DeviceId.deviceId(Dpid.uri(dpid));
-        Collection<PortStatistics> stats = buildPortStatistics(deviceId, portStatsEntries);
+        Collection<PortStatistics> stats =
+                buildPortStatistics(deviceId, ImmutableList.copyOf(portStatsEntries));
         providerService.updatePortStatistics(deviceId, stats);
     }