Replaced with the diamnod operator 17/15917/2
authorrama-huawei <rama.subba.reddy.s@huawei.com>
Wed, 27 Sep 2017 10:22:13 +0000 (15:52 +0530)
committerRama SubbaReddy <rama.subba.reddy.s@huawei.com>
Wed, 27 Sep 2017 11:41:05 +0000 (11:41 +0000)
Issue-Id:SO-118

Change-Id: Iaad28a363586cd8b42e86bd7e854faa9e716c59d
Signed-off-by: rama-huawei <rama.subba.reddy.s@huawei.com>
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudConfig.java
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudConfigIdentityMapper.java
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/IdentityAuthenticationTypeAbstract.java
bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/SDNO.java
bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/SDNOValidator.java

index eac76c7..2323007 100644 (file)
@@ -56,9 +56,9 @@ public class CloudConfig {
 
     private boolean                    validCloudConfig = false;
     @JsonProperty("identity_services")
-    private Map<String, CloudIdentity> identityServices = new HashMap<String, CloudIdentity>();
+    private Map<String, CloudIdentity> identityServices = new HashMap<>();
     @JsonProperty("cloud_sites")
-    private Map<String, CloudSite>     cloudSites       = new HashMap<String, CloudSite>();
+    private Map<String, CloudSite>     cloudSites       = new HashMap<>();
 
     private static ObjectMapper        mapper           = new ObjectMapper();
 
@@ -135,7 +135,7 @@ public class CloudConfig {
                     if (version == null || version.equals(cs.getAic_version())) {
                         return cs;
                     }
-                } else if (cs.getId().equalsIgnoreCase("default")) {
+                } else if ("default".equalsIgnoreCase(cs.getId())) {
                     // save it off in case we need it
                     defaultCloudSite = cs.clone();
                 }
index 53fc7a5..9677d0e 100644 (file)
@@ -23,6 +23,7 @@ package org.openecomp.mso.cloud;
  * This interface provides the method signature for mapping registration.\r
  * All mappings should be registered by the implementing class.\r
  */\r
+@FunctionalInterface\r
 public interface CloudConfigIdentityMapper {\r
 \r
        public void registerAllMappings();\r
index f40c7d9..41f70e4 100644 (file)
@@ -72,7 +72,7 @@ public abstract class IdentityAuthenticationTypeAbstract {
 \r
        @Override\r
        public final boolean equals(Object other) {\r
-               return ((this.identityType != null) && (other != null) && (other instanceof IdentityAuthenticationTypeAbstract) && (this.identityType.equals(other.toString())));\r
+               return (this.identityType != null) && (other != null) && (other instanceof IdentityAuthenticationTypeAbstract) && (this.identityType.equals(other.toString()));\r
        }\r
 \r
        @Override\r
index c634164..7d794ac 100644 (file)
@@ -28,7 +28,7 @@ public class SDNO implements Serializable
     @JsonProperty("body")
     private Body body;
     @JsonIgnore
-    private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+    private Map<String, Object> additionalProperties = new HashMap<>();
     private final static long serialVersionUID = -5303297382564282650L;
 
     @JsonProperty("operation")
index be63fee..c2b3d3e 100644 (file)
@@ -2,6 +2,7 @@ package org.openecomp.mso.client.sdno;
 
 import java.io.IOException;
 
+@FunctionalInterface
 public interface SDNOValidator {
        
        void healthDiagnostic(String vnfName, String uuid) throws IOException, Exception;