X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-remoterpc-connector%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fremote%2Frpc%2Fregistry%2FRpcRegistry.java;h=1e481bc311b3f30d2bfc75346077253a871bdff0;hb=refs%2Fchanges%2F14%2F35714%2F2;hp=b467ce949ae4a86e9500fffa9f05b85c0ba407e1;hpb=7c58c4ddf96b33b95519149e45089c03c21b2f47;p=controller.git diff --git a/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/RpcRegistry.java b/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/RpcRegistry.java index b467ce949a..1e481bc311 100644 --- a/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/RpcRegistry.java +++ b/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/RpcRegistry.java @@ -187,7 +187,11 @@ public class RpcRegistry extends BucketStore { @Override protected void onBucketsUpdated() { - for(Runnable callBack: routesUpdatedCallbacks) { + if(routesUpdatedCallbacks.isEmpty()) { + return; + } + + for(Runnable callBack: routesUpdatedCallbacks.toArray(new Runnable[routesUpdatedCallbacks.size()])) { callBack.run(); } }