diff options
-rw-r--r-- | openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/zusammen/EntitlementPoolZusammenDaoImpl.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/zusammen/EntitlementPoolZusammenDaoImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/zusammen/EntitlementPoolZusammenDaoImpl.java index aa90df8389..2216519031 100644 --- a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/zusammen/EntitlementPoolZusammenDaoImpl.java +++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/zusammen/EntitlementPoolZusammenDaoImpl.java @@ -170,10 +170,13 @@ public class EntitlementPoolZusammenDaoImpl implements EntitlementPoolDao { ElementContext elementContext = new ElementContext(entitlementPoolEntity.getVendorLicenseModelId(), entitlementPoolEntity.getVersion().getId()); Optional<ElementInfo> elementInfo1 = zusammenAdaptor.getElementInfo(context, elementContext, new Id(entitlementPoolEntity.getId())); - Map<String, Object> properties = elementInfo1.get().getInfo().getProperties(); String manufacturerReferenceNumber = null; - if (properties != null && properties.containsKey("manufacturerReferenceNumber")) { - manufacturerReferenceNumber = (String) properties.get("manufacturerReferenceNumber"); + if (elementInfo1.isPresent()) { + Map<String, Object> properties = elementInfo1.get().getInfo().getProperties(); + + if (properties != null && properties.containsKey("manufacturerReferenceNumber")) { + manufacturerReferenceNumber = (String) properties.get("manufacturerReferenceNumber"); + } } return manufacturerReferenceNumber; } |