commit | b7e8cebe3236ce71027c77bd6a516ea8fcb341e5 | [log] [tgz] |
---|---|---|
author | Charles Chan <rascov@gmail.com> | Tue Mar 20 13:30:38 2018 -0700 |
committer | Charles Chan <charles@opennetworking.org> | Thu Mar 22 21:39:12 2018 +0000 |
tree | 3e09c3dcc7c5d10e6e4531c0ae930c6c1f343958 | |
parent | a67b5d54c1d18523ef614b463b6fb77159d48e7e [diff] |
Avoid ConcurrentModificationException Change-Id: I0cadfb3a49a67e3d21d6749c923af55d36589d5c
diff --git a/apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/config/DeviceConfiguration.java b/apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/config/DeviceConfiguration.java index 070a7ec..0282fa4 100644 --- a/apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/config/DeviceConfiguration.java +++ b/apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/config/DeviceConfiguration.java
@@ -20,6 +20,7 @@ import com.fasterxml.jackson.databind.node.ObjectNode; import com.google.common.collect.HashMultimap; import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Multimaps; import com.google.common.collect.SetMultimap; import org.onlab.packet.Ip4Address; import org.onlab.packet.Ip6Address; @@ -81,8 +82,8 @@ int pwRoutingLabel; public SegmentRouterInfo() { - gatewayIps = HashMultimap.create(); - subnets = HashMultimap.create(); + gatewayIps = Multimaps.synchronizedSetMultimap(HashMultimap.create()); + subnets = Multimaps.synchronizedSetMultimap(HashMultimap.create()); } }