From 433947b5ab5e28fc29aee447de934de89a707419 Mon Sep 17 00:00:00 2001 From: "andre.schmid" Date: Thu, 19 Sep 2019 16:14:01 +0100 Subject: Centralize onboarding package validation Change-Id: I3cc58cf15f62008e83cfc7ddb095d07ab216b82a Issue-ID: SDC-2583 Signed-off-by: andre.schmid --- .../java/org/openecomp/sdc/validation/util/ValidationManagerUtil.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'openecomp-be/backend/openecomp-sdc-validation-manager') diff --git a/openecomp-be/backend/openecomp-sdc-validation-manager/src/main/java/org/openecomp/sdc/validation/util/ValidationManagerUtil.java b/openecomp-be/backend/openecomp-sdc-validation-manager/src/main/java/org/openecomp/sdc/validation/util/ValidationManagerUtil.java index d1d61c66b3..6a7466d20d 100644 --- a/openecomp-be/backend/openecomp-sdc-validation-manager/src/main/java/org/openecomp/sdc/validation/util/ValidationManagerUtil.java +++ b/openecomp-be/backend/openecomp-sdc-validation-manager/src/main/java/org/openecomp/sdc/validation/util/ValidationManagerUtil.java @@ -43,7 +43,7 @@ public class ValidationManagerUtil { */ public static void handleMissingManifest(FileContentHandler fileContentMap, Map> errors) throws IOException { - try (InputStream manifest = fileContentMap.getFileContent(SdcCommon.MANIFEST_NAME)) { + try (InputStream manifest = fileContentMap.getFileContentAsStream(SdcCommon.MANIFEST_NAME)) { if (manifest == null) { ErrorMessage.ErrorMessageUtil.addMessage(SdcCommon.MANIFEST_NAME, errors) .add(new ErrorMessage(ErrorLevel.ERROR, Messages.MANIFEST_NOT_EXIST.getErrorMessage())); @@ -60,7 +60,7 @@ public class ValidationManagerUtil { public static ValidationManager initValidationManager(FileContentHandler fileContentMap) { ValidationManager validationManager = ValidationManagerFactory.getInstance().createInterface(); fileContentMap.getFileList().forEach(fileName -> validationManager - .addFile(fileName, FileUtils.toByteArray(fileContentMap.getFileContent(fileName)))); + .addFile(fileName, FileUtils.toByteArray(fileContentMap.getFileContentAsStream(fileName)))); return validationManager; } } -- cgit 1.2.3-korg