diff options
author | mojahidi <mojahidul.islam@amdocs.com> | 2017-12-13 17:30:36 +0530 |
---|---|---|
committer | Vitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com> | 2017-12-24 11:59:36 +0000 |
commit | 16fc3b451e8ab56187eb1c8db9e9b3efc1ba2e67 (patch) | |
tree | 2df1f1c5f9b01187674c48d5560cfcff5174c93e /openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl | |
parent | b61fb80535adaa4fbf09d949ba0584d3ee10f4bf (diff) |
Fixed sonar issues - YamlValidator
Removed unused logger
Removed useless parentheses
Change-Id: Ia804c7c461690172f67d610df0bfa46c17525ae8
Issue-ID: SDC-343
Signed-off-by: mojahidi <mojahidul.islam@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl')
-rw-r--r-- | openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/YamlValidator.java | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/YamlValidator.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/YamlValidator.java index ab2e427f23..7e1ba98de5 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/YamlValidator.java +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/YamlValidator.java @@ -1,21 +1,17 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ +/* + * Copyright © 2016-2017 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * 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. - * ============LICENSE_END========================================================= */ package org.openecomp.sdc.validation.impl.validators; @@ -25,8 +21,6 @@ import org.openecomp.core.validation.errors.ErrorMessagesFormatBuilder; import org.openecomp.core.validation.types.GlobalValidationContext; import org.openecomp.sdc.common.errors.Messages; import org.openecomp.sdc.datatypes.error.ErrorLevel; -import org.openecomp.sdc.logging.api.Logger; -import org.openecomp.sdc.logging.api.LoggerFactory; import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage; import org.openecomp.sdc.logging.types.LoggerErrorDescription; import org.openecomp.sdc.logging.types.LoggerTragetServiceName; @@ -40,22 +34,21 @@ import java.util.Map; import java.util.Optional; public class YamlValidator implements Validator { - public static final MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage(); - private static final Logger logger = (Logger) LoggerFactory.getLogger(YamlValidator.class); + private static final MdcDataDebugMessage MDC_DATA_DEBUG_MESSAGE = new MdcDataDebugMessage(); private static final ErrorMessageCode ERROR_CODE_YML_1 = new ErrorMessageCode("YML1"); private static final ErrorMessageCode ERROR_CODE_YML_2 = new ErrorMessageCode("YML2"); @Override public void validate(GlobalValidationContext globalContext) { - mdcDataDebugMessage.debugEntryMessage(null, null); + MDC_DATA_DEBUG_MESSAGE.debugEntryMessage(null, null); Collection<String> files = globalContext.files( - (fileName, globalValidationContext) -> (fileName.endsWith(".yaml") - || fileName.endsWith(".yml") || fileName.endsWith(".env"))); + (fileName, globalValidationContext) -> fileName.endsWith(".yaml") + || fileName.endsWith(".yml") || fileName.endsWith(".env")); files.stream().forEach(fileName -> validate(fileName, globalContext)); - mdcDataDebugMessage.debugExitMessage(null, null); + MDC_DATA_DEBUG_MESSAGE.debugExitMessage(null, null); } private void validate(String fileName, GlobalValidationContext globalContext) { |