Committed by
Ray Milkey
ONOS-1114 - NPE for EQUAL switch reconnection
Change-Id: Id5d6f40610bdf4f97e65313c33a91c85678b153b
Showing
1 changed file
with
3 additions
and
2 deletions
... | @@ -21,6 +21,7 @@ import com.google.common.collect.FluentIterable; | ... | @@ -21,6 +21,7 @@ import com.google.common.collect.FluentIterable; |
21 | import com.google.common.collect.ImmutableList; | 21 | import com.google.common.collect.ImmutableList; |
22 | import com.google.common.collect.Maps; | 22 | import com.google.common.collect.Maps; |
23 | import com.google.common.collect.Sets; | 23 | import com.google.common.collect.Sets; |
24 | + | ||
24 | import org.apache.commons.lang3.RandomUtils; | 25 | import org.apache.commons.lang3.RandomUtils; |
25 | import org.apache.felix.scr.annotations.Activate; | 26 | import org.apache.felix.scr.annotations.Activate; |
26 | import org.apache.felix.scr.annotations.Component; | 27 | import org.apache.felix.scr.annotations.Component; |
... | @@ -549,7 +550,7 @@ public class GossipDeviceStore | ... | @@ -549,7 +550,7 @@ public class GossipDeviceStore |
549 | // redo ONOS-490 | 550 | // redo ONOS-490 |
550 | if (deviceNode == null) { | 551 | if (deviceNode == null) { |
551 | // silently ignore | 552 | // silently ignore |
552 | - return null; | 553 | + return Collections.emptyList(); |
553 | } | 554 | } |
554 | 555 | ||
555 | PortInjectedEvent portInjectedEvent = new PortInjectedEvent(providerId, deviceId, portDescriptions); | 556 | PortInjectedEvent portInjectedEvent = new PortInjectedEvent(providerId, deviceId, portDescriptions); |
... | @@ -564,7 +565,7 @@ public class GossipDeviceStore | ... | @@ -564,7 +565,7 @@ public class GossipDeviceStore |
564 | } | 565 | } |
565 | } | 566 | } |
566 | 567 | ||
567 | - return deviceEvents; | 568 | + return deviceEvents == null ? Collections.emptyList() : deviceEvents; |
568 | } | 569 | } |
569 | 570 | ||
570 | private List<DeviceEvent> updatePortsInternal(ProviderId providerId, | 571 | private List<DeviceEvent> updatePortsInternal(ProviderId providerId, | ... | ... |
-
Please register or login to post a comment