From: mojahidi Date: Wed, 13 Dec 2017 11:23:52 +0000 (+0530) Subject: Fixed sonar issues - YamlValidatorUtil X-Git-Tag: v1.2.0~646 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F13%2F26213%2F3;p=sdc.git Fixed sonar issues - YamlValidatorUtil Added private constructor to hide the implicit public one Change-Id: Iaedd9c5fe8f55025af6b26a41837da2c6e75a5fc Issue-ID: SDC-343 Signed-off-by: mojahidi --- diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/util/YamlValidatorUtil.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/util/YamlValidatorUtil.java index 8eb8d50774..bd049b2dfb 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/util/YamlValidatorUtil.java +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/util/YamlValidatorUtil.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.util; @@ -24,12 +20,13 @@ import org.openecomp.sdc.common.errors.Messages; import org.yaml.snakeyaml.error.MarkedYAMLException; import org.yaml.snakeyaml.parser.ParserException; -/** - * @author Avrahamg - * @since December 08, 2016 - */ public class YamlValidatorUtil { + private YamlValidatorUtil() { + + } + public static String getParserExceptionReason(Exception exception) { + String reason = null; if (exception.getCause() instanceof MarkedYAMLException) {