From 2346d78c04a025d40ee2427944e3e1e2a669668a Mon Sep 17 00:00:00 2001 From: shrek2000 Date: Wed, 27 Dec 2017 16:09:34 +0200 Subject: sonar issue fix - remove dead code remove dead code. Issue-ID: SDC-804 Change-Id: I1bae8d3d338730dfad72b155eacebc8e1f5c838f Signed-off-by: shrek2000 --- .../MapComputeDetailsDtoToComputeEntity.java | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest') diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/mapping/MapComputeDetailsDtoToComputeEntity.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/mapping/MapComputeDetailsDtoToComputeEntity.java index 7db9a0a9b1..93db7e3e76 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/mapping/MapComputeDetailsDtoToComputeEntity.java +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/mapping/MapComputeDetailsDtoToComputeEntity.java @@ -1,3 +1,18 @@ +/* + * 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.sdcrests.vsp.rest.mapping; import org.openecomp.core.utilities.json.JsonUtil; @@ -7,11 +22,12 @@ import org.openecomp.sdcrests.vendorsoftwareproducts.types.ComputeDescription; import org.openecomp.sdcrests.vendorsoftwareproducts.types.ComputeDetailsDto; public class MapComputeDetailsDtoToComputeEntity extends MappingBase { + ComputeEntity> { + @Override public void doMapping(ComputeDetailsDto source, ComputeEntity target) { ComputeDescription computeDesc = new ComputeDescription(source.getName(), source - .getDescription()); - target.setCompositionData(computeDesc == null ? null : JsonUtil.object2Json(computeDesc)); + .getDescription()); + target.setCompositionData(JsonUtil.object2Json(computeDesc)); } } -- cgit 1.2.3-korg