From 582b284fa893df52ea11c5dec7f158e53db6df5b Mon Sep 17 00:00:00 2001 From: lding7 Date: Mon, 19 Mar 2018 14:49:00 +0800 Subject: fix a sonar complaints NullPointerException a bug from https://sonar.onap.org/project/issues?id=org.openecomp.sdc%3Asdc-main%3A1.2.0-SNAPSHOT&open=AWIFjPcyRGy6eclHC_RW&resolved=false&types=BUG Change-Id: Ibe0e1e457edb4d474ba4a37894f066f5a0b24361 Issue-ID: SDC-1145 Signed-off-by: lding7 --- .../services/impl/filedatastructuremodule/CandidateServiceImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/services/impl/filedatastructuremodule/CandidateServiceImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/services/impl/filedatastructuremodule/CandidateServiceImpl.java index b962a79738..4618d28756 100644 --- a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/services/impl/filedatastructuremodule/CandidateServiceImpl.java +++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/services/impl/filedatastructuremodule/CandidateServiceImpl.java @@ -589,6 +589,7 @@ public class CandidateServiceImpl implements CandidateService { FilesDataStructure structure, int inx, Map> uploadErrors) { for (HeatStructureTree volume : volumeSet) { + Objects.requireNonNull(volume, "volume cannot be null!"); if (inx++ > 0) { ErrorsUtil.addStructureErrorToErrorMap(SdcCommon.UPLOAD_FILE, new ErrorMessage(ErrorLevel.WARNING, -- cgit 1.2.3-korg