From a9602f8f97a64cc1855b5228bfc3c7502c82fe92 Mon Sep 17 00:00:00 2001 From: Abhai Singh Date: Thu, 4 Jan 2018 11:11:14 +0530 Subject: Fix Sonar ElementToVSPQuestionnaireConvertor Fixed reported sonar issue Change-Id: Ib1918e43a15f41535a3f5e1cd31340fe430eae61 Issue-ID: SDC-343 Signed-off-by: Abhai Singh --- .../ElementToVSPQuestionnaireConvertor.java | 24 ++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'openecomp-be/lib') diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/convertor/ElementToVSPQuestionnaireConvertor.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/convertor/ElementToVSPQuestionnaireConvertor.java index d51b8b23b3..1dffe7e979 100644 --- a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/convertor/ElementToVSPQuestionnaireConvertor.java +++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/convertor/ElementToVSPQuestionnaireConvertor.java @@ -1,3 +1,19 @@ +/* + * 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. + */ + package org.openecomp.sdc.vendorsoftwareproduct.dao.impl.zusammen.convertor; import com.amdocs.zusammen.adaptor.inbound.api.types.item.Element; @@ -6,12 +22,16 @@ import org.openecomp.convertor.ElementConvertor; import org.openecomp.sdc.vendorsoftwareproduct.dao.type.VspQuestionnaireEntity; public class ElementToVSPQuestionnaireConvertor extends ElementConvertor { + @Override public VspQuestionnaireEntity convert( Element element) { - if(element == null) return null; + + if(element == null) { + return null; + } + VspQuestionnaireEntity entity = new VspQuestionnaireEntity(); entity.setQuestionnaireData(new String(FileUtils.toByteArray(element.getData()))); return entity; } - } -- cgit 1.2.3-korg