Using nonNull API's in ELAN
[netvirt.git] / elanmanager / api / src / main / java / org / opendaylight / netvirt / elanmanager / api / ElanHelper.java
index ca8f97ef0cc83ec2f515bd92603798809e9767c8..51140ba2d6bd9cd5ebe4610c270f79f0f754e779 100644 (file)
@@ -62,7 +62,7 @@ public final class ElanHelper {
             ElanDpnInterfacesList existingElanDpnInterfaces = SingleTransactionDataBroker.syncRead(broker,
                     LogicalDatastoreType.OPERATIONAL, elanDpnInterfaceId);
             if (existingElanDpnInterfaces != null) {
-                return new ArrayList<DpnInterfaces>(existingElanDpnInterfaces.getDpnInterfaces().values()).stream()
+                return new ArrayList<DpnInterfaces>(existingElanDpnInterfaces.nonnullDpnInterfaces().values()).stream()
                         .flatMap(v -> v.getInterfaces().stream()).collect(Collectors.toList());
             }
         } catch (ExpectedDataObjectNotFoundException e) {