aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeshu Kumar M <seshu.kumar.m@huawei.com>2017-10-12 14:46:56 +0000
committerGerrit Code Review <gerrit@onap.org>2017-10-12 14:46:56 +0000
commit8a392234b5f57d2bdd528ec183741466042de4d2 (patch)
tree85395556868020caff7d4fc5935f62018efed4b2
parent0a5a51c189c98c8ae294465cad69ce28a4886b00 (diff)
parent3693992e59252f2d3691094fa5fcef4bad7e14d1 (diff)
Merge "Iterate over "entrySet" instead of "keySet""
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/CreateNetworkRequest.java2
-rw-r--r--adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/SDNCServiceRequestTask.java2
-rw-r--r--adapters/mso-tenant-adapter/src/main/java/org/openecomp/mso/adapters/tenant/MsoTenantAdapterImpl.java2
-rw-r--r--adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterAsyncImpl.java12
4 files changed, 11 insertions, 7 deletions
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/CreateNetworkRequest.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/CreateNetworkRequest.java
index 9def0a4878..061da6fca2 100644
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/CreateNetworkRequest.java
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/CreateNetworkRequest.java
@@ -67,7 +67,7 @@ public class CreateNetworkRequest extends NetworkRequestCommon {
private ContrailNetwork contrailNetwork;
private Boolean failIfExists = false;
private Boolean backout = true;
- private Map<String,String> networkParams = new HashMap<String, String>();
+ private Map<String,String> networkParams = new HashMap<>();
private MsoRequest msoRequest = new MsoRequest();
public CreateNetworkRequest() {
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/SDNCServiceRequestTask.java b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/SDNCServiceRequestTask.java
index 3e908e4296..2c5355f5fb 100644
--- a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/SDNCServiceRequestTask.java
+++ b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/SDNCServiceRequestTask.java
@@ -196,7 +196,7 @@ public class SDNCServiceRequestTask implements Runnable {
} catch (Exception e) {
LOGGER.error(MessageEnum.RA_ERROR_CONVERT_XML2STR, "", "",
MsoLogger.ErrorCode.DataError, "Exception - domToStr", e);
- return(null);
+ return null;
}
LOGGER.debug("Formatted SDNC service request XML:\n" + xml);
diff --git a/adapters/mso-tenant-adapter/src/main/java/org/openecomp/mso/adapters/tenant/MsoTenantAdapterImpl.java b/adapters/mso-tenant-adapter/src/main/java/org/openecomp/mso/adapters/tenant/MsoTenantAdapterImpl.java
index a875a862aa..29f5630586 100644
--- a/adapters/mso-tenant-adapter/src/main/java/org/openecomp/mso/adapters/tenant/MsoTenantAdapterImpl.java
+++ b/adapters/mso-tenant-adapter/src/main/java/org/openecomp/mso/adapters/tenant/MsoTenantAdapterImpl.java
@@ -103,7 +103,7 @@ public class MsoTenantAdapterImpl implements MsoTenantAdapter {
MsoTenantUtils tUtils = tFactory.getTenantUtils (cloudSiteId);
MsoTenant newTenant = null;
- String newTenantId = null;
+ String newTenantId;
long queryTenantStartTime = System.currentTimeMillis ();
try {
newTenant = tUtils.queryTenantByName (tenantName, cloudSiteId);
diff --git a/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterAsyncImpl.java b/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterAsyncImpl.java
index b3756c4ccb..15a4e0ab94 100644
--- a/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterAsyncImpl.java
+++ b/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterAsyncImpl.java
@@ -555,9 +555,11 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
sMap = hMap.value;
UpdateVnfNotification.Outputs.Entry entry = new UpdateVnfNotification.Outputs.Entry ();
- for (String key : sMap.keySet ()) {
+ for (Map.Entry<String,String> mapEntry : sMap.entrySet ()) {
+ String key = mapEntry.getKey();
+ String value = mapEntry.getValue();
entry.setKey (key);
- entry.setValue (sMap.get (key));
+ entry.setValue (value);
outputs.getEntry ().add (entry);
}
}
@@ -574,9 +576,11 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
QueryVnfNotification.Outputs.Entry entry = new QueryVnfNotification.Outputs.Entry ();
- for (String key : sMap.keySet ()) {
+ for (Map.Entry<String,String> mapEntry : sMap.entrySet ()) {
+ String key = mapEntry.getKey();
+ String value = mapEntry.getValue();
entry.setKey (key);
- entry.setValue (sMap.get (key));
+ entry.setValue (value);
outputs.getEntry ().add (entry);
}
}