Committed by
Gerrit Code Review
Fix NPE when setting strict if there are no links present
Change-Id: Ic43d8807d5d2a86a3f716214c7fcf5a00f1e9477
Showing
1 changed file
with
4 additions
and
0 deletions
| ... | @@ -493,9 +493,13 @@ public class ECLinkStore | ... | @@ -493,9 +493,13 @@ 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 | + if (linkDescriptions != null) { | ||
| 496 | linkDescriptions.clear(); | 497 | linkDescriptions.clear(); |
| 498 | + } | ||
| 499 | + if (links != null) { | ||
| 497 | links.clear(); | 500 | links.clear(); |
| 498 | } | 501 | } |
| 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()); |
| 501 | } | 505 | } | ... | ... |
-
Please register or login to post a comment