AAI Customer list is empty fix
Change-Id: I7439c6f7bb18daddc297af1d83a53d576b8914a1
Issue-ID: VID-78
Signed-off-by: Sonsino, Ofir (os0695) <os0695@intl.att.com>
diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/SubscriberListWithFilterData.java b/vid-app-common/src/main/java/org/onap/vid/aai/SubscriberListWithFilterData.java
index 0d4b4b7..d7f9ad8 100644
--- a/vid-app-common/src/main/java/org/onap/vid/aai/SubscriberListWithFilterData.java
+++ b/vid-app-common/src/main/java/org/onap/vid/aai/SubscriberListWithFilterData.java
@@ -13,7 +13,7 @@
public class SubscriberListWithFilterData {
public SubscriberListWithFilterData(SubscriberList subscriberList, RoleValidator roleValidator){
- List<Subscriber> subscribers = subscriberList.customer;
+ List<Subscriber> subscribers = subscriberList != null ? subscriberList.customer : new ArrayList<Subscriber>();
List<SubscriberWithFilter> subscribersWithFilter = new ArrayList<>();
for (Subscriber subscriber :subscribers){
SubscriberWithFilter subscriberWithFilter = new SubscriberWithFilter();