mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-10-24 22:01:02 +02:00
Avoid concurrent modification exception by iterating over a immutable collection
Change-Id: Icfffa1347071eb298a25b11ee0511f36002b0675
This commit is contained in:
parent
b0d7058766
commit
e81f1cf2ae
@ -47,7 +47,6 @@ import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.ReferencePolicy;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
|
||||
import org.onosproject.app.ApplicationEvent;
|
||||
import org.onosproject.app.ApplicationListener;
|
||||
import org.onosproject.app.ApplicationService;
|
||||
@ -252,7 +251,7 @@ public class DatabaseManager implements StorageService, StorageAdminService {
|
||||
log.info("Successfully closed databases.");
|
||||
}
|
||||
});
|
||||
maps.values().forEach(this::unregisterMap);
|
||||
ImmutableList.copyOf(maps.values()).forEach(this::unregisterMap);
|
||||
if (applicationService != null) {
|
||||
applicationService.removeListener(appListener);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user