Fix ConcurrentModificationEx in RpcRegistry.onBucketsUpdated 14/35714/2
authorTom Pantelis <tpanteli@brocade.com>
Thu, 3 Mar 2016 17:52:47 +0000 (12:52 -0500)
committerGerrit Code Review <gerrit@opendaylight.org>
Fri, 4 Mar 2016 06:31:57 +0000 (06:31 +0000)
commitf09d37ec4cce2411eaae11dde18f9ce2d2f14118
tree5072dbfa123062e16de081075a639951d2efae76
parent7c58c4ddf96b33b95519149e45089c03c21b2f47
Fix ConcurrentModificationEx in RpcRegistry.onBucketsUpdated

This was introduced by a recent patch. onBucketsUpdated iterates the
routesUpdateCallbacks however one of the callbacks in receiveGetRouter
removes itself from the list causing the ConcurrentModificationEx.

I changed onBucketsUpdated to first copy the list to an array to prevent
this.

Change-Id: I44c9a89b4b433f711cf4f90bf28e6955d8784f5f
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/RpcRegistry.java
opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/registry/RpcRegistryTest.java