commit | 15a8178e2e45c4baff09ddaa3eac1710609fd99a | [log] [tgz] |
---|---|---|
author | Saurav Das <sauravdas@alumni.stanford.edu> | Fri Feb 09 09:15:03 2018 -0800 |
committer | Thomas Vachuska <tom@opennetworking.org> | Fri Feb 09 10:49:43 2018 -0800 |
tree | 3e1f53f07de3ab631be32769f2ac42df12efb0a4 | |
parent | 02a94982b6cbe24c520fd8eef7a145e7f7d18241 [diff] |
Fix for NPE that can get triggered upon onos instance restart. Change-Id: I9ea9d8d92d43dc0543be0b336ba9bcc856b9bcbc
diff --git a/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/DefaultRoutingHandler.java b/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/DefaultRoutingHandler.java index f1a63fc..3aed5cc 100644 --- a/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/DefaultRoutingHandler.java +++ b/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/DefaultRoutingHandler.java
@@ -263,6 +263,9 @@ // 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()) {