Sonar fixes and improvements 66/89666/4
authorr.bogacki <r.bogacki@samsung.com>
Tue, 11 Jun 2019 06:48:21 +0000 (08:48 +0200)
committerRobert Bogacki <r.bogacki@samsung.com>
Mon, 17 Jun 2019 09:33:22 +0000 (09:33 +0000)
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 <r.bogacki@samsung.com>
Change-Id: I9345b6ab0f4027b17e1bebf0b6657394c13dc298

bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/License.java
bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/Request.java
bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/ResourceDecomposition.java

index 1db360f..4d70d0f 100644 (file)
@@ -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<String> entitlementPoolList = new ArrayList<String>();
+    private List<String> entitlementPoolList = new ArrayList();
     @JsonInclude(JsonInclude.Include.NON_EMPTY)
-    private List<String> licenseKeyGroupList = new ArrayList<String>();
+    private List<String> licenseKeyGroupList = new ArrayList<>();
 
 
     public List<String> getEntitlementPoolList() {
index 6c33d37..eb24c96 100644 (file)
@@ -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
index b291765..7dbf97d 100644 (file)
@@ -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() {
-    // }
 }