From dcc03a35879a1a194500b2e0b5be32f34d8210b6 Mon Sep 17 00:00:00 2001 From: mojahidi Date: Tue, 15 May 2018 11:59:53 +0530 Subject: Handle logger.debug(, exception) Removed logger.debug(, exception) from code Change-Id: I92a10d4581511e2cd0c073a9519dd161c4abe570 Issue-ID: SDC-836 Signed-off-by: mojahidi --- .../services/schemagenerator/SchemaGenerator.java | 25 +++++++++------------- 1 file changed, 10 insertions(+), 15 deletions(-) (limited to 'openecomp-be/lib/openecomp-sdc-vendor-software-product-lib') diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/services/schemagenerator/SchemaGenerator.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/services/schemagenerator/SchemaGenerator.java index edfbd8c94f..4aaa9a8a03 100644 --- a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/services/schemagenerator/SchemaGenerator.java +++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/services/schemagenerator/SchemaGenerator.java @@ -1,22 +1,18 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ +/* + * 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. * 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.vendorsoftwareproduct.services.schemagenerator; @@ -25,8 +21,6 @@ import freemarker.template.TemplateException; import org.openecomp.sdc.common.errors.CoreException; import org.openecomp.sdc.common.errors.ErrorCategory; import org.openecomp.sdc.common.errors.ErrorCode; -import org.openecomp.sdc.logging.api.Logger; -import org.openecomp.sdc.logging.api.LoggerFactory; import org.openecomp.sdc.vendorsoftwareproduct.types.composition.CompositionEntityType; import org.openecomp.sdc.vendorsoftwareproduct.types.schemagenerator.SchemaTemplateContext; import org.openecomp.sdc.vendorsoftwareproduct.types.schemagenerator.SchemaTemplateInput; @@ -37,7 +31,9 @@ import java.io.Writer; public class SchemaGenerator { public static final String SCHEMA_GENERATION_ERROR = "SCHEMA_GENERATION_ERROR"; - private final static Logger log = (Logger) LoggerFactory.getLogger(SchemaGenerator.class.getName()); + private SchemaGenerator() { + // Utility classes, which are a collection of static members, are not meant to be instantiated + } /** * Generate string. @@ -59,10 +55,9 @@ public class SchemaGenerator { schemaTemplate.process(input, writer); return writer.toString(); } catch (IOException | TemplateException exception) { - log.debug("",exception); throw new CoreException( new ErrorCode.ErrorCodeBuilder().withCategory(ErrorCategory.APPLICATION) - .withId(SCHEMA_GENERATION_ERROR).withMessage(exception.getMessage()).build()); + .withId(SCHEMA_GENERATION_ERROR).withMessage(exception.getMessage()).build(), exception); } } } -- cgit 1.2.3-korg