diff options
Diffstat (limited to 'adapters/mso-adapter-utils/src/main/java/org')
4 files changed, 11 insertions, 10 deletions
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudConfig.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudConfig.java index eac76c74a5..23230071c7 100644 --- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudConfig.java +++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudConfig.java @@ -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(); } diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudConfigIdentityMapper.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudConfigIdentityMapper.java index 53fc7a55f1..9677d0ee1c 100644 --- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudConfigIdentityMapper.java +++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudConfigIdentityMapper.java @@ -23,6 +23,7 @@ package org.openecomp.mso.cloud; * This interface provides the method signature for mapping registration.
* All mappings should be registered by the implementing class.
*/
+@FunctionalInterface
public interface CloudConfigIdentityMapper {
public void registerAllMappings();
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/IdentityAuthenticationTypeAbstract.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/IdentityAuthenticationTypeAbstract.java index f40c7d9882..41f70e4492 100644 --- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/IdentityAuthenticationTypeAbstract.java +++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/IdentityAuthenticationTypeAbstract.java @@ -72,7 +72,7 @@ public abstract class IdentityAuthenticationTypeAbstract { @Override
public final boolean equals(Object other) {
- return ((this.identityType != null) && (other != null) && (other instanceof IdentityAuthenticationTypeAbstract) && (this.identityType.equals(other.toString())));
+ return (this.identityType != null) && (other != null) && (other instanceof IdentityAuthenticationTypeAbstract) && (this.identityType.equals(other.toString()));
}
@Override
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/NetworkInfo.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/NetworkInfo.java index 11cd5dfbd5..9f2c275670 100644 --- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/NetworkInfo.java +++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/NetworkInfo.java @@ -42,13 +42,13 @@ public class NetworkInfo { private String id = ""; private NetworkStatus status = NetworkStatus.UNKNOWN; private String provider = ""; - private List<Integer> vlans = new ArrayList<Integer>(); - private List<String> subnets = new ArrayList<String>(); + private List<Integer> vlans = new ArrayList<>(); + private List<String> subnets = new ArrayList<>(); private String shared = ""; static Map<String,NetworkStatus> NetworkStatusMap; static { - NetworkStatusMap = new HashMap<String,NetworkStatus>(); + NetworkStatusMap = new HashMap<>(); NetworkStatusMap.put("ACTIVE", NetworkStatus.ACTIVE); NetworkStatusMap.put("DOWN", NetworkStatus.DOWN); NetworkStatusMap.put("BUILD", NetworkStatus.BUILD); @@ -96,14 +96,14 @@ public class NetworkInfo { if (network.getProviderPhysicalNetwork() != null) { this.provider = network.getProviderPhysicalNetwork(); - if (network.getProviderNetworkType().equals("vlan")) { + if ("vlan".equals(network.getProviderNetworkType())) { this.vlans.add(network.getProviderSegmentationId()); } } - else if (network.getSegments() != null && network.getSegments().size() > 0) { + else if (network.getSegments() != null && !network.getSegments().isEmpty()) { Segment s = network.getSegments().get(0); this.provider = s.getProviderPhysicalNetwork(); - if (s.getProviderNetworkType().equals("vlan")) { + if ("vlan".equals(s.getProviderNetworkType())) { for (Segment s1 : network.getSegments()) { this.vlans.add(s1.getProviderSegmentationId()); } |