From b92822da4bdc3646fcd73ed0a4c6a43ae3786b79 Mon Sep 17 00:00:00 2001 From: vempo Date: Thu, 1 Feb 2018 17:08:23 +0200 Subject: Removed passing unnecessary logging info Change-Id: Ie5cbfad67798b3e0827155078bd0797c7b824efe Issue-ID: SDC-772 Signed-off-by: vempo --- .../openecomp/sdc/validation/base/ResourceBaseValidator.java | 11 ++++------- .../org/openecomp/sdc/validation/util/ValidationUtil.java | 10 ++-------- 2 files changed, 6 insertions(+), 15 deletions(-) (limited to 'openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-sdk/src') diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-sdk/src/main/java/org/openecomp/sdc/validation/base/ResourceBaseValidator.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-sdk/src/main/java/org/openecomp/sdc/validation/base/ResourceBaseValidator.java index 5013283c8f..76b63d5498 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-sdk/src/main/java/org/openecomp/sdc/validation/base/ResourceBaseValidator.java +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-sdk/src/main/java/org/openecomp/sdc/validation/base/ResourceBaseValidator.java @@ -16,8 +16,6 @@ import org.openecomp.sdc.heat.services.HeatStructureUtil; import org.openecomp.sdc.heat.services.manifest.ManifestUtil; import org.openecomp.sdc.logging.api.Logger; import org.openecomp.sdc.logging.api.LoggerFactory; -import org.openecomp.sdc.logging.types.LoggerErrorDescription; -import org.openecomp.sdc.logging.types.LoggerTragetServiceName; import org.openecomp.sdc.validation.ResourceValidator; import org.openecomp.sdc.validation.ValidationContext; import org.openecomp.sdc.validation.Validator; @@ -33,8 +31,8 @@ import java.util.Objects; */ public class ResourceBaseValidator implements Validator { - protected Map resourceTypeToImpl = new HashMap<>(); - private static Logger logger = LoggerFactory.getLogger(ResourceBaseValidator.class); + protected final Map resourceTypeToImpl = new HashMap<>(); + private static final Logger LOGGER = LoggerFactory.getLogger(ResourceBaseValidator.class); private static final ErrorMessageCode ERROR_CODE_RBV_1 = new ErrorMessageCode("RBV1"); private static final ErrorMessageCode ERROR_CODE_RBV_2 = new ErrorMessageCode("RBV2"); @@ -56,7 +54,7 @@ public class ResourceBaseValidator implements Validator { try { manifestContent = ValidationUtil.validateManifest(globalContext); } catch (Exception exception) { - logger.debug("",exception); + LOGGER.debug("",exception); return; } @@ -94,8 +92,7 @@ public class ResourceBaseValidator implements Validator { globalContext.addMessage(fileName, ErrorLevel.WARNING, ErrorMessagesFormatBuilder .getErrorWithParameters(ERROR_CODE_RBV_1, Messages.INVALID_RESOURCE_TYPE.getErrorMessage(),"null", - resourceEntry.getKey()), LoggerTragetServiceName.VALIDATE_RESOURCE_TYPE, - LoggerErrorDescription.INVALID_RESOURCE_TYPE); + resourceEntry.getKey())); } else { ResourceValidator resourceValidatorImpl = getResourceValidatorInstance(resourceType, resourceTypeToImpl); diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-sdk/src/main/java/org/openecomp/sdc/validation/util/ValidationUtil.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-sdk/src/main/java/org/openecomp/sdc/validation/util/ValidationUtil.java index db1d9eac88..a2826e4871 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-sdk/src/main/java/org/openecomp/sdc/validation/util/ValidationUtil.java +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-sdk/src/main/java/org/openecomp/sdc/validation/util/ValidationUtil.java @@ -18,8 +18,6 @@ import org.openecomp.sdc.heat.datatypes.model.ResourceReferenceFunctions; import org.openecomp.sdc.heat.services.HeatStructureUtil; import org.openecomp.sdc.logging.api.Logger; import org.openecomp.sdc.logging.api.LoggerFactory; -import org.openecomp.sdc.logging.types.LoggerErrorDescription; -import org.openecomp.sdc.logging.types.LoggerTragetServiceName; import org.openecomp.sdc.tosca.services.YamlUtil; import java.io.InputStream; @@ -147,9 +145,7 @@ public class ValidationUtil { ErrorMessagesFormatBuilder.getErrorWithParameters(globalContext.getMessageCode(), Messages.PARAMETER_NAME_NOT_ALIGNED_WITH_GUIDELINES.getErrorMessage(), getMessagePartAccordingToResourceType(resourceEntry), propertyName, propertyValue, - resourceEntry.getKey()), - LoggerTragetServiceName.VALIDATE_IMAGE_AND_FLAVOR_NAME, - LoggerErrorDescription.NAME_NOT_ALIGNED_WITH_GUIDELINES); + resourceEntry.getKey())); return true; } return false; @@ -199,9 +195,7 @@ public class ValidationUtil { globalContext.addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder .getErrorWithParameters(globalContext.getMessageCode(), Messages.INVALID_HEAT_FORMAT_REASON.getErrorMessage() - , getParserExceptionReason(exception)), - LoggerTragetServiceName.VALIDATE_HEAT_FORMAT, - LoggerErrorDescription.INVALID_HEAT_FORMAT); + , getParserExceptionReason(exception))); return null; } return heatOrchestrationTemplate; -- cgit 1.2.3-korg