Reorder modifiers. 61/86361/1
authorh00397475 <hena.choudhury@huawei.com>
Fri, 26 Apr 2019 08:19:03 +0000 (13:49 +0530)
committerh00397475 <hena.choudhury@huawei.com>
Fri, 26 Apr 2019 08:19:03 +0000 (13:49 +0530)
Reorder modifiers to complt with Java code specifications
Issue-ID: SO-1490

Change-Id: Ic7d2700347b79e0c155f84d3ca1175dda1edb6f8
Signed-off-by: h00397475 <hena.choudhury@huawei.com>
asdc-controller/src/main/java/org/onap/so/asdc/client/test/emulators/NotificationDataImpl.java
asdc-controller/src/main/java/org/onap/so/asdc/client/test/emulators/ResourceInfoImpl.java
asdc-controller/src/main/java/org/onap/so/asdc/client/test/rest/ASDCRestInterface.java
asdc-controller/src/main/java/org/onap/so/asdc/installer/ASDCElementInfo.java

index c61306f..9fd5c2a 100644 (file)
@@ -124,7 +124,7 @@ public class NotificationDataImpl implements INotificationData {
 
     @Override
     public List<IResourceInstance> getResources() {
-        List<IResourceInstance> ret = new ArrayList<IResourceInstance>();
+        List<IResourceInstance> ret = new ArrayList<>();
         if (resources != null) {
             ret.addAll(resources);
         }
@@ -145,7 +145,7 @@ public class NotificationDataImpl implements INotificationData {
 
     @Override
     public List<IArtifactInfo> getServiceArtifacts() {
-        List<IArtifactInfo> temp = new ArrayList<IArtifactInfo>();
+        List<IArtifactInfo> temp = new ArrayList<>();
         if (serviceArtifacts != null) {
             temp.addAll(serviceArtifacts);
         }
index 62d11ff..2f109cd 100644 (file)
@@ -31,7 +31,6 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
 
 @JsonIgnoreProperties(ignoreUnknown = true)
 public class ResourceInfoImpl implements IResourceInstance {
-    public ResourceInfoImpl() {}
 
     private String resourceInstanceName;
     private String resourceCustomizationUUID;
@@ -44,6 +43,8 @@ public class ResourceInfoImpl implements IResourceInstance {
     private String subcategory;
     private List<ArtifactInfoImpl> artifacts;
 
+    public ResourceInfoImpl() {}
+
     private ResourceInfoImpl(IResourceInstance resourceInstance) {
         resourceInstanceName = resourceInstance.getResourceInstanceName();
         resourceCustomizationUUID = resourceInstance.getResourceCustomizationUUID();
@@ -58,7 +59,7 @@ public class ResourceInfoImpl implements IResourceInstance {
     }
 
     public static List<ResourceInfoImpl> convertToJsonContainer(List<IResourceInstance> resources) {
-        List<ResourceInfoImpl> buildResources = new ArrayList<ResourceInfoImpl>();
+        List<ResourceInfoImpl> buildResources = new ArrayList<>();
         if (resources != null) {
             for (IResourceInstance resourceInstance : resources) {
                 buildResources.add(new ResourceInfoImpl(resourceInstance));
@@ -114,7 +115,7 @@ public class ResourceInfoImpl implements IResourceInstance {
 
     @Override
     public List<IArtifactInfo> getArtifacts() {
-        List<IArtifactInfo> temp = new ArrayList<IArtifactInfo>();
+        List<IArtifactInfo> temp = new ArrayList<>();
         if (artifacts != null) {
             temp.addAll(artifacts);
         }
index 14ea0cd..46ec34e 100644 (file)
@@ -103,10 +103,10 @@ public class ASDCRestInterface {
             distributionClientEmulator = new DistributionClientEmulator("resource-examples/");
             statusData = JsonStatusData.instantiateNotifFromJsonFile("resource-examples/");
 
-            ASDCController asdcController = new ASDCController("asdc-controller1", distributionClientEmulator);
-            asdcController.initASDC();
+            ASDCController controller = new ASDCController("asdc-controller1", distributionClientEmulator);
+            controller.initASDC();
             toscaInstaller.installTheComponentStatus(statusData);
-            asdcController.closeASDC();
+            controller.closeASDC();
         } catch (Exception e) {
             logger.info("Error caught " + e.getMessage());
             logger.error("{} {} {} {} {} {}", MessageEnum.ASDC_GENERAL_EXCEPTION.toString(),
index 043055e..81b0843 100644 (file)
@@ -47,7 +47,7 @@ public class ASDCElementInfo {
      * <li>{@link ASDCElementTypeEnum#VNF_RESOURCE}</li>
      * <ul>
      */
-    public static enum ASDCElementTypeEnum {
+    public enum ASDCElementTypeEnum {
         /**
          * The type VNF_RESOURCE. Represents a VNF_RESOURCE element.
          */