From 8b9114fc27e1849179e31c713bbd54c2119ee154 Mon Sep 17 00:00:00 2001 From: olegb Date: Tue, 13 Mar 2018 14:35:36 +0200 Subject: Empty error message during Proceed To Validation Issue-ID: SDC-1120 Change-Id: I6653d6404e8d43ec81016f3497051ac327375c88 Signed-off-by: olegb --- .../openecomp/sdc/validation/impl/validators/HeatValidator.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'openecomp-be/lib/openecomp-sdc-validation-lib') diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/HeatValidator.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/HeatValidator.java index 0c4371439b..d35a4842d3 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/HeatValidator.java +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/HeatValidator.java @@ -332,7 +332,12 @@ public class HeatValidator implements Validator { private static String getResourceTypeFromResourcesMap(String resourceName, HeatOrchestrationTemplate heatOrchestrationTemplate) { - return heatOrchestrationTemplate.getResources().get(resourceName).getType(); + Resource resource = heatOrchestrationTemplate.getResources().get(resourceName); + if (Objects.nonNull(resource)) { + return resource.getType(); + } else { + return null; + } } /* validation 17 + */ -- cgit 1.2.3-korg