commit | a02bb6d9d3eaa6be1ad8e1f316735d3daa2f6538 | [log] [tgz] |
---|---|---|
author | Jordan Halterman <jordan@opennetworking.org> | Wed Nov 29 22:27:00 2017 -0800 |
committer | Ray Milkey <ray@opennetworking.org> | Thu Nov 30 19:35:17 2017 +0000 |
tree | 527c818e0162e0330a4cda0571fa2f10f5668c7a | |
parent | 807d87ad82305093206d80be625065af322f0a18 [diff] |
[ONOS-7277] Use thread safe list for OF ports to avoid ConcurrentModificationException Change-Id: Iada077126401ddb12e049b72890f82bf7948827b
diff --git a/protocols/openflow/api/src/main/java/org/onosproject/openflow/controller/driver/AbstractOpenFlowSwitch.java b/protocols/openflow/api/src/main/java/org/onosproject/openflow/controller/driver/AbstractOpenFlowSwitch.java index 9865dd1..323e03a 100644 --- a/protocols/openflow/api/src/main/java/org/onosproject/openflow/controller/driver/AbstractOpenFlowSwitch.java +++ b/protocols/openflow/api/src/main/java/org/onosproject/openflow/controller/driver/AbstractOpenFlowSwitch.java
@@ -44,7 +44,6 @@ import org.slf4j.LoggerFactory; import java.io.IOException; -import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.concurrent.atomic.AtomicInteger; @@ -72,7 +71,7 @@ private OFVersion ofVersion; private OFFactory ofFactory; - protected List<OFPortDescStatsReply> ports = new ArrayList<>(); + protected List<OFPortDescStatsReply> ports = Lists.newCopyOnWriteArrayList(); protected boolean tableFull;