summaryrefslogtreecommitdiffstats
path: root/adapters/mso-openstack-adapters/src/main/java/org/onap
diff options
context:
space:
mode:
authorSmokowski, Steven <steve.smokowski@att.com>2020-10-20 10:14:33 -0400
committerBenjamin, Max (mb388a) <mb388a@att.com>2020-10-20 10:14:34 -0400
commitb60470ebdd206c190c7ca29d294670ec5f9744b4 (patch)
tree7be2e6ca3450e9b5c0e98ac3b0ae6bd69670bd5c /adapters/mso-openstack-adapters/src/main/java/org/onap
parentd6bc3bcbe9f0cecf69355a112828f3611b951b56 (diff)
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) <mb388a@att.com> Change-Id: I9b8ad005b96df0006f723bb54bbfe475e5892d2c
Diffstat (limited to 'adapters/mso-openstack-adapters/src/main/java/org/onap')
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeImpl.java2
1 files changed, 1 insertions, 1 deletions
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<org.openstack4j.model.compute.Image> extractOpenstackImagesFromServers(final List<Server> 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());
}