From f1909fc64cf9da0e8cb46a04432d0aa0f66d5ed5 Mon Sep 17 00:00:00 2001 From: "r.bogacki" Date: Tue, 11 Jun 2019 08:48:21 +0200 Subject: Sonar fixes and improvements General fixes and improvements according to the Sonar analysis. -Fixed imports. -Improvements in diamond operators. -Removed unnecessary code. Issue-ID: SO-1992 Signed-off-by: Robert Bogacki Change-Id: I9345b6ab0f4027b17e1bebf0b6657394c13dc298 --- .../src/main/java/org/onap/so/bpmn/core/domain/License.java | 7 ++++--- .../src/main/java/org/onap/so/bpmn/core/domain/Request.java | 3 ++- .../java/org/onap/so/bpmn/core/domain/ResourceDecomposition.java | 9 ++------- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/License.java b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/License.java index 1db360f391..4d70d0f14b 100644 --- a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/License.java +++ b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/License.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (c) 2019 Samsung + * ================================================================================ * 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 @@ -22,7 +24,6 @@ package org.onap.so.bpmn.core.domain; import java.io.Serializable; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import org.json.JSONArray; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -40,9 +41,9 @@ public class License extends JsonWrapper implements Serializable { private static final long serialVersionUID = 1L; @JsonInclude(JsonInclude.Include.NON_EMPTY) - private List entitlementPoolList = new ArrayList(); + private List entitlementPoolList = new ArrayList(); @JsonInclude(JsonInclude.Include.NON_EMPTY) - private List licenseKeyGroupList = new ArrayList(); + private List licenseKeyGroupList = new ArrayList<>(); public List getEntitlementPoolList() { diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/Request.java b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/Request.java index 6c33d37cfe..eb24c96bca 100644 --- a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/Request.java +++ b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/Request.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (c) 2019 Samsung + * ================================================================================ * 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 @@ -21,7 +23,6 @@ package org.onap.so.bpmn.core.domain; import java.io.Serializable; -import com.fasterxml.jackson.annotation.JsonRootName; /** * This class is used to store instance data of services aka ServiceDecomposition diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/ResourceDecomposition.java b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/ResourceDecomposition.java index b291765252..7dbf97d223 100644 --- a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/ResourceDecomposition.java +++ b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/ResourceDecomposition.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (c) 2019 Samsung + * ================================================================================ * 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 @@ -27,7 +29,6 @@ import com.fasterxml.jackson.annotation.JsonIgnore; * Abstract superclass for all individual decomposition resources * */ -// @JsonIgnoreProperties public abstract class ResourceDecomposition extends JsonWrapper implements Serializable { private static final long serialVersionUID = 1L; @@ -74,9 +75,6 @@ public abstract class ResourceDecomposition extends JsonWrapper implements Seria public String getResourceInstanceName() { return this.getInstanceData().getInstanceName(); } - // @JsonIgnore - // public String getResourceHomingSolution() { - // } public void setResourceInstanceId(String newInstanceId) { this.getInstanceData().setInstanceId(newInstanceId); @@ -85,7 +83,4 @@ public abstract class ResourceDecomposition extends JsonWrapper implements Seria public void setResourceInstanceName(String newInstanceName) { this.getInstanceData().setInstanceName(newInstanceName); } - // @JsonIgnore - // public String setResourceHomingSolution() { - // } } -- cgit 1.2.3-korg