aboutsummaryrefslogtreecommitdiffstats
path: root/adapters/mso-adapter-utils/src/main
diff options
context:
space:
mode:
authorSeshu Kumar M <seshu.kumar.m@huawei.com>2017-10-02 15:26:15 +0000
committerGerrit Code Review <gerrit@onap.org>2017-10-02 15:26:15 +0000
commitb6c9a4595aa0add8b4b054065e73ff99d4b2294e (patch)
tree12c94fd1110959c2ddcc48bfe35f10a7293f6322 /adapters/mso-adapter-utils/src/main
parente371d7539741aeb092b723fbc0fe39e3fdc7461f (diff)
parent7869c1c81cdb575f1d3e59f21951226b38f02418 (diff)
Merge "Fixed major sonar issues"
Diffstat (limited to 'adapters/mso-adapter-utils/src/main')
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/NetworkInfo.java12
1 files changed, 6 insertions, 6 deletions
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());
}