From 3582690ce5ca69b6d12c5568314c1f9e4ecdfbf5 Mon Sep 17 00:00:00 2001 From: mojahidi Date: Tue, 15 May 2018 12:40:30 +0530 Subject: Handle logger.debug(, exception) in HeatTree Removed logger.debug(, exception) from code Change-Id: Ib51a6e9ae2a1aa18803e736ff8f5835e31d2ac62 Issue-ID: SDC-836 Signed-off-by: mojahidi --- .../validators/ForbiddenResourceGuideLineValidator.java | 16 ++++++++-------- .../sdc/validation/impl/validators/HeatValidator.java | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl') diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/ForbiddenResourceGuideLineValidator.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/ForbiddenResourceGuideLineValidator.java index 0f4dbf4d1c..c17b3e8393 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/ForbiddenResourceGuideLineValidator.java +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/ForbiddenResourceGuideLineValidator.java @@ -1,5 +1,5 @@ /* - * Copyright © 2016-2017 European Support Limited + * Copyright © 2018 European Support Limited * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -12,10 +12,15 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ +*/ package org.openecomp.sdc.validation.impl.validators; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + import org.apache.commons.collections4.MapUtils; import org.openecomp.core.validation.ErrorMessageCode; import org.openecomp.core.validation.errors.ErrorMessagesFormatBuilder; @@ -32,11 +37,6 @@ import org.openecomp.sdc.logging.api.LoggerFactory; import org.openecomp.sdc.validation.Validator; import org.openecomp.sdc.validation.util.ValidationUtil; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; - public class ForbiddenResourceGuideLineValidator implements Validator { private static Set forbiddenResources = new HashSet<>(); private static final ErrorMessageCode ERROR_CODE_FRG_1 = new ErrorMessageCode("FRG1"); @@ -75,7 +75,7 @@ public class ForbiddenResourceGuideLineValidator implements Validator { try { manifestContent = ValidationUtil.validateManifest(globalContext); } catch (Exception exception) { - LOGGER.debug("",exception); + LOGGER.error("Failed to validate manifest file", exception); return; } 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 6a2a0a9528..961fd848aa 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 @@ -316,7 +316,7 @@ public class HeatValidator implements Validator { throw new Exception("The file '" + resourceType + "' has no content"); } } catch (Exception exception) { - LOGGER.debug("",exception); + LOGGER.error("Invalid yaml file", exception); return; } nestedOutputMap = nestedHeatOrchestrationTemplate.getOutputs(); @@ -481,7 +481,7 @@ public class HeatValidator implements Validator { try { manifestContent = ValidationUtil.validateManifest(globalContext); } catch (Exception exception) { - LOGGER.debug("",exception); + LOGGER.error("Failed to validate manifest file", exception); return; } Map fileTypeMap = ManifestUtil.getFileTypeMap(manifestContent); -- cgit 1.2.3-korg