From b60470ebdd206c190c7ca29d294670ec5f9744b4 Mon Sep 17 00:00:00 2001 From: "Smokowski, Steven" Date: Tue, 20 Oct 2020 10:14:33 -0400 Subject: Update code to filter null or empty images Update code to filter null or empty images Issue-ID: SO-3314 Signed-off-by: Benjamin, Max (mb388a) Change-Id: I9b8ad005b96df0006f723bb54bbfe475e5892d2c --- .../src/main/java/org/onap/so/heatbridge/HeatBridgeImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'adapters/mso-openstack-adapters/src/main/java') diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeImpl.java index 6a62a5de61..45b29244d1 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeImpl.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeImpl.java @@ -245,7 +245,7 @@ public class HeatBridgeImpl implements HeatBridgeApi { @Override public List extractOpenstackImagesFromServers(final List servers) { Objects.requireNonNull(osClient, ERR_MSG_NULL_OS_CLIENT); - return servers.stream().map(Server::getImage) + return servers.stream().filter(s -> s.getImage() != null).map(Server::getImage) .filter(distinctByProperty(org.openstack4j.model.compute.Image::getId)).collect(Collectors.toList()); } -- cgit 1.2.3-korg