Committed by
Gerrit Code Review
Fix NPE in NetworkConfigHostProvider
Change-Id: I89ca7328abdbb06d75ea3840d6606835584eaddc
Showing
1 changed file
with
3 additions
and
1 deletions
... | @@ -110,7 +110,9 @@ public class NetworkConfigHostProvider extends AbstractProvider implements HostP | ... | @@ -110,7 +110,9 @@ public class NetworkConfigHostProvider extends AbstractProvider implements HostP |
110 | */ | 110 | */ |
111 | protected void addHost(MacAddress mac, VlanId vlan, HostLocation hloc, Set<IpAddress> ips) { | 111 | protected void addHost(MacAddress mac, VlanId vlan, HostLocation hloc, Set<IpAddress> ips) { |
112 | HostId hid = HostId.hostId(mac, vlan); | 112 | HostId hid = HostId.hostId(mac, vlan); |
113 | - HostDescription desc = new DefaultHostDescription(mac, vlan, hloc, ips); | 113 | + HostDescription desc = (ips != null) ? |
114 | + new DefaultHostDescription(mac, vlan, hloc, ips) : | ||
115 | + new DefaultHostDescription(mac, vlan, hloc); | ||
114 | providerService.hostDetected(hid, desc, false); | 116 | providerService.hostDetected(hid, desc, false); |
115 | } | 117 | } |
116 | 118 | ... | ... |
-
Please register or login to post a comment