Qianqian Hu
Committed by Gerrit Code Review

When authenticaiton succees, a NullPointerException may be triggered if there is…

… no match in portToVlanMap , which will stop aaa from listening to radius server. A try-catch is added here in order to prevent subsequent authentication failure in aaa

Change-Id: Iea0c53ff59ed42f0c369400c155b7d8e14a6748f
......@@ -340,7 +340,13 @@ public class OnosXosIntegrationManager implements VoltTenantService {
}
PortNumber onuPort = newTenant.port().port();
VlanId subscriberVlan = VlanId.vlanId(portToVlan.get(onuPort.toLong()));
VlanId subscriberVlan;
try {
subscriberVlan = VlanId.vlanId(portToVlan.get(onuPort.toLong()));
} catch (NullPointerException npe) {
log.error("No matched port in portToVlan map", npe);
return newTenant;
}
VoltTenant tenantToCreate = VoltTenant.builder()
.withProviderService(providerServiceId)
......