Function input can be null
Change-Id: I9e9276f57c6c055935ed416c8ce197c24d2cfcc5
Showing
1 changed file
with
4 additions
and
0 deletions
... | @@ -518,9 +518,13 @@ public class GossipLinkStore | ... | @@ -518,9 +518,13 @@ public class GossipLinkStore |
518 | private final class LookupLink implements Function<LinkKey, Link> { | 518 | private final class LookupLink implements Function<LinkKey, Link> { |
519 | @Override | 519 | @Override |
520 | public Link apply(LinkKey input) { | 520 | public Link apply(LinkKey input) { |
521 | + if (input == null) { | ||
522 | + return null; | ||
523 | + } else { | ||
521 | return links.get(input); | 524 | return links.get(input); |
522 | } | 525 | } |
523 | } | 526 | } |
527 | + } | ||
524 | 528 | ||
525 | private void notifyDelegateIfNotNull(LinkEvent event) { | 529 | private void notifyDelegateIfNotNull(LinkEvent event) { |
526 | if (event != null) { | 530 | if (event != null) { | ... | ... |
-
Please register or login to post a comment