commit | 3c4124a97e04e729886259576074ef0ced458f36 | [log] [tgz] |
---|---|---|
author | Ray Milkey <ray@onlab.us> | Wed Aug 31 12:09:06 2016 -0700 |
committer | Gerrit Code Review <gerrit@onlab.us> | Wed Aug 31 20:41:21 2016 +0000 |
tree | 45e4e6f684642645ad033323159259a0d4a04ca5 | |
parent | fa454bd768a6ecdf684ec45c199d27c8e5f92844 [diff] |
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); }