From 346f0ef5d1acc815e038b9af75f8a8352289a3cb Mon Sep 17 00:00:00 2001 From: mojahidi Date: Wed, 13 Dec 2017 16:53:52 +0530 Subject: Fixed sonar issues - YamlValidatorUtil Added private constructor to hide the implicit public one Change-Id: Iaedd9c5fe8f55025af6b26a41837da2c6e75a5fc Issue-ID: SDC-343 Signed-off-by: mojahidi --- .../validation/impl/util/YamlValidatorUtil.java | 23 ++++++++++------------ 1 file changed, 10 insertions(+), 13 deletions(-) (limited to 'openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src') 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) { -- cgit 1.2.3-korg