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
Showing
1 changed file
with
7 additions
and
1 deletions
... | @@ -340,7 +340,13 @@ public class OnosXosIntegrationManager implements VoltTenantService { | ... | @@ -340,7 +340,13 @@ public class OnosXosIntegrationManager implements VoltTenantService { |
340 | } | 340 | } |
341 | 341 | ||
342 | PortNumber onuPort = newTenant.port().port(); | 342 | PortNumber onuPort = newTenant.port().port(); |
343 | - VlanId subscriberVlan = VlanId.vlanId(portToVlan.get(onuPort.toLong())); | 343 | + VlanId subscriberVlan; |
344 | + try { | ||
345 | + subscriberVlan = VlanId.vlanId(portToVlan.get(onuPort.toLong())); | ||
346 | + } catch (NullPointerException npe) { | ||
347 | + log.error("No matched port in portToVlan map", npe); | ||
348 | + return newTenant; | ||
349 | + } | ||
344 | 350 | ||
345 | VoltTenant tenantToCreate = VoltTenant.builder() | 351 | VoltTenant tenantToCreate = VoltTenant.builder() |
346 | .withProviderService(providerServiceId) | 352 | .withProviderService(providerServiceId) | ... | ... |
-
Please register or login to post a comment