Ray Milkey
Committed by Gerrit Code Review

Fix NPE when setting strict if there are no links present

Change-Id: Ic43d8807d5d2a86a3f716214c7fcf5a00f1e9477
...@@ -493,8 +493,12 @@ public class ECLinkStore ...@@ -493,8 +493,12 @@ public class ECLinkStore
493 if (linkDiscoveryMode == LinkDiscoveryMode.STRICT) { 493 if (linkDiscoveryMode == LinkDiscoveryMode.STRICT) {
494 // Remove any previous links to force them to go through the strict 494 // Remove any previous links to force them to go through the strict
495 // discovery process 495 // discovery process
496 - linkDescriptions.clear(); 496 + if (linkDescriptions != null) {
497 - links.clear(); 497 + linkDescriptions.clear();
498 + }
499 + if (links != null) {
500 + links.clear();
501 + }
498 } 502 }
499 log.debug("config set link discovery mode to {}", 503 log.debug("config set link discovery mode to {}",
500 linkDiscoveryMode.name()); 504 linkDiscoveryMode.name());
......