Fix for NPE that can get triggered upon onos instance restart.

Change-Id: I9ea9d8d92d43dc0543be0b336ba9bcc856b9bcbc
This commit is contained in:
Saurav Das 2018-02-09 09:15:03 -08:00 committed by Thomas Vachuska
parent 02a94982b6
commit 15a8178e2e

View File

@ -263,6 +263,9 @@ public class DefaultRoutingHandler {
// new ECMPspg calculation as it is not a topology event. As a
// result, we use the current/existing ECMPspg in the updated map
// used by the redoRouting method.
if (updatedEcmpSpgMap == null) {
updatedEcmpSpgMap = new HashMap<>();
}
currentEcmpSpgMap.entrySet().forEach(entry -> {
updatedEcmpSpgMap.put(entry.getKey(), entry.getValue());
if (log.isDebugEnabled()) {