Iterate over the entrySet instead of keySet

Issue-id: SO-214

Change-Id: I3f417fee04ae1fe2c1d0b7361ec0272e1b098302
Signed-off-by: rama-huawei <rama.subba.reddy.s@huawei.com>
diff --git a/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/CatalogQuery.java b/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/CatalogQuery.java
index 6c7d584..a74cf07 100644
--- a/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/CatalogQuery.java
+++ b/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/CatalogQuery.java
@@ -86,7 +86,7 @@
 		case "v1": return smartToJSON();
 		case "v2": return JSON2(isArray, !IS_EMBED);
 		default:
-			return ("invalid version: "+ version);
+			return "invalid version: "+ version;
 		}
 	}
-}
\ No newline at end of file
+}
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/SDNCServiceRequestConnector.java b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/SDNCServiceRequestConnector.java
index f0fcf18..ab2c4ef 100644
--- a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/SDNCServiceRequestConnector.java
+++ b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/SDNCServiceRequestConnector.java
@@ -43,6 +43,7 @@
 public class SDNCServiceRequestConnector extends SDNCConnector {
 
     private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
+    private static final String YES = "Y";
 	@Override
 	protected SDNCResponseCommon createResponseFromContent(int statusCode, String statusMessage,
 			String responseContent, TypedRequestTunables rt) {
@@ -57,7 +58,7 @@
 	@Override
 	protected SDNCErrorCommon createErrorResponse(int statusCode, String errMsg,
 			TypedRequestTunables rt) {
-		return new SDNCServiceError(rt.getReqId(), String.valueOf(statusCode), errMsg, "Y");
+		return new SDNCServiceError(rt.getReqId(), String.valueOf(statusCode), errMsg, YES);
 	}
 
 	/**
@@ -133,10 +134,10 @@
 			// ack-final-indicator is optional: default to "Y".
 
 			if (ackFinalIndicator == null || ackFinalIndicator.trim().isEmpty()) {
-				ackFinalIndicator = "Y";
+				ackFinalIndicator = YES;
 			}
 
-			if (!ackFinalIndicator.equals("Y") && !"N".equals(ackFinalIndicator)) {
+			if (!YES.equals(ackFinalIndicator) && !"N".equals(ackFinalIndicator)) {
 				throw new ParseException("Invalid ack-final-indicator in SDNC response: '" + ackFinalIndicator + "'", 0);
 			}
 
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 15a4e0a..4842580 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
@@ -54,11 +54,10 @@
 @WebService(serviceName = "VnfAdapterAsync", endpointInterface = "org.openecomp.mso.adapters.vnf.MsoVnfAdapterAsync", targetNamespace = "http://org.openecomp.mso/vnfA")
 public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
 
-	MsoPropertiesFactory msoPropertiesFactory = new MsoPropertiesFactory();
+    MsoPropertiesFactory msoPropertiesFactory = new MsoPropertiesFactory();
+    CloudConfigFactory cloudConfigFactory=new CloudConfigFactory();
 
-	CloudConfigFactory cloudConfigFactory=new CloudConfigFactory();
-
-	public static final String MSO_PROP_VNF_ADAPTER="MSO_PROP_VNF_ADAPTER";
+    public static final String MSO_PROP_VNF_ADAPTER="MSO_PROP_VNF_ADAPTER";
     private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
     private static MsoAlarmLogger alarmLogger = new MsoAlarmLogger ();
     private static final String BPEL_AUTH_PROP = "org.openecomp.mso.adapters.vnf.bpelauth";
@@ -155,8 +154,8 @@
                                   vnfRollback);
             MsoLogger.setServiceName (serviceName);
         } catch (VnfException e) {
-        	MsoLogger.setServiceName (serviceName);
-        	LOGGER.error (MessageEnum.RA_CREATE_VNF_ERR,  vnfName, cloudSiteId, tenantId, "", "createVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "VnfException in createVnfA", e);
+            MsoLogger.setServiceName (serviceName);
+            LOGGER.error (MessageEnum.RA_CREATE_VNF_ERR,  vnfName, cloudSiteId, tenantId, "", "createVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "VnfException in createVnfA", e);
             org.openecomp.mso.adapters.vnf.async.client.MsoExceptionCategory exCat = null;
             String eMsg = null;
             try {
@@ -229,8 +228,8 @@
             vnfAdapter.updateVnf (cloudSiteId, tenantId, vnfType,vnfVersion, vnfName, requestType, volumeGroupHeatStackId, inputs, msoRequest, outputs, vnfRollback);
             MsoLogger.setServiceName (serviceName);
         } catch (VnfException e) {
-        	MsoLogger.setServiceName (serviceName);
-        	LOGGER.error (MessageEnum.RA_UPDATE_VNF_ERR,  vnfName, cloudSiteId, tenantId, "", "UpdateVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "Exception sending updateVnf notification", e);
+            MsoLogger.setServiceName (serviceName);
+            LOGGER.error (MessageEnum.RA_UPDATE_VNF_ERR,  vnfName, cloudSiteId, tenantId, "", "UpdateVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "Exception sending updateVnf notification", e);
             org.openecomp.mso.adapters.vnf.async.client.MsoExceptionCategory exCat = null;
             String eMsg = null;
             try {
@@ -239,7 +238,7 @@
                                                                                                      .getCategory ()
                                                                                                      .name ());
             } catch (Exception e1) {
-            	LOGGER.error (MessageEnum.RA_FAULT_INFO_EXC, "", "UpdateVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "Exception - fault info", e1);
+                LOGGER.error (MessageEnum.RA_FAULT_INFO_EXC, "", "UpdateVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "Exception - fault info", e1);
             }
             // Build and send Asynchronous error response
             try {
@@ -311,7 +310,7 @@
             vnfAdapter.queryVnf (cloudSiteId, tenantId, vnfName, msoRequest, vnfExists, vnfId, status, outputs);
             MsoLogger.setServiceName (serviceName);
         } catch (VnfException e) {
-        	MsoLogger.setServiceName (serviceName);
+            MsoLogger.setServiceName (serviceName);
             LOGGER.error (MessageEnum.RA_QUERY_VNF_ERR,  vnfName, cloudSiteId, tenantId, "", "queryVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "Exception sending queryVnfA notification", e);
             org.openecomp.mso.adapters.vnf.async.client.MsoExceptionCategory exCat = null;
             String eMsg = null;
@@ -321,7 +320,7 @@
                                                                                                      .getCategory ()
                                                                                                      .name ());
             } catch (Exception e1) {
-            	LOGGER.error (MessageEnum.RA_FAULT_INFO_EXC, "", "queryVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "Exception - fault info", e1);
+                LOGGER.error (MessageEnum.RA_FAULT_INFO_EXC, "", "queryVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "Exception - fault info", e1);
             }
             // Build and send Asynchronous error response
             try {
@@ -395,8 +394,8 @@
             vnfAdapter.deleteVnf (cloudSiteId, tenantId, vnfName, msoRequest);
             MsoLogger.setServiceName (serviceName);
         } catch (VnfException e) {
-        	MsoLogger.setServiceName (serviceName);
-        	LOGGER.error (MessageEnum.RA_DELETE_VNF_ERR,  vnfName, cloudSiteId, tenantId, "", "deleteVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "Exception sending deleteVnfA notification", e);
+            MsoLogger.setServiceName (serviceName);
+            LOGGER.error (MessageEnum.RA_DELETE_VNF_ERR,  vnfName, cloudSiteId, tenantId, "", "deleteVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "Exception sending deleteVnfA notification", e);
             org.openecomp.mso.adapters.vnf.async.client.MsoExceptionCategory exCat = null;
             String eMsg = null;
             try {
@@ -405,7 +404,7 @@
                                                                                                      .getCategory ()
                                                                                                      .name ());
             } catch (Exception e1) {
-            	LOGGER.error (MessageEnum.RA_FAULT_INFO_EXC, "", "deleteVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "Exception - fault info", e1);
+                LOGGER.error (MessageEnum.RA_FAULT_INFO_EXC, "", "deleteVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "Exception - fault info", e1);
             }
             // Build and send Asynchronous error response
             try {
@@ -465,8 +464,8 @@
             vnfAdapter.rollbackVnf (rollback);
             MsoLogger.setServiceName (serviceName);
         } catch (VnfException e) {
-        	MsoLogger.setServiceName (serviceName);
-        	LOGGER.error (MessageEnum.RA_ROLLBACK_VNF_ERR, "", "rollbackVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "Exception sending rollbackVnfA notification", e);
+            MsoLogger.setServiceName (serviceName);
+            LOGGER.error (MessageEnum.RA_ROLLBACK_VNF_ERR, "", "rollbackVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "Exception sending rollbackVnfA notification", e);
             org.openecomp.mso.adapters.vnf.async.client.MsoExceptionCategory exCat = null;
             String eMsg = null;
             try {
@@ -475,7 +474,7 @@
                                                                                                      .getCategory ()
                                                                                                      .name ());
             } catch (Exception e1) {
-            	LOGGER.error (MessageEnum.RA_FAULT_INFO_EXC, "", "rollbackVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "Exception - fault info", e1);
+                LOGGER.error (MessageEnum.RA_FAULT_INFO_EXC, "", "rollbackVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "Exception - fault info", e1);
             }
             // Build and send Asynchronous error response
             try {
@@ -513,11 +512,11 @@
 
             cvrb.setCloudSiteId (hVrb.value.getCloudSiteId ());
             if (hVrb.value.getMsoRequest() != null) {
-            	cmr.setRequestId (hVrb.value.getMsoRequest ().getRequestId ());
-            	cmr.setServiceInstanceId (hVrb.value.getMsoRequest ().getServiceInstanceId ());
+                cmr.setRequestId (hVrb.value.getMsoRequest ().getRequestId ());
+                cmr.setServiceInstanceId (hVrb.value.getMsoRequest ().getServiceInstanceId ());
             } else {
-            	cmr.setRequestId (null);
-            	cmr.setServiceInstanceId (null);
+                cmr.setRequestId (null);
+                cmr.setServiceInstanceId (null);
             }
             cvrb.setMsoRequest (cmr);
             cvrb.setVnfId (hVrb.value.getVnfId ());
@@ -556,8 +555,8 @@
             UpdateVnfNotification.Outputs.Entry entry = new UpdateVnfNotification.Outputs.Entry ();
 
             for (Map.Entry<String,String> mapEntry : sMap.entrySet ()) {
-		String key = mapEntry.getKey();
-		String value = mapEntry.getValue();
+                String key = mapEntry.getKey();
+                String value = mapEntry.getValue();
                 entry.setKey (key);
                 entry.setValue (value);
                 outputs.getEntry ().add (entry);
@@ -577,8 +576,8 @@
             QueryVnfNotification.Outputs.Entry entry = new QueryVnfNotification.Outputs.Entry ();
 
             for (Map.Entry<String,String> mapEntry : sMap.entrySet ()) {
-		String key = mapEntry.getKey();
-		String value = mapEntry.getValue();
+                String key = mapEntry.getKey();
+                String value = mapEntry.getValue();
                 entry.setKey (key);
                 entry.setValue (value);
                 outputs.getEntry ().add (entry);
@@ -596,7 +595,7 @@
             LOGGER.error (MessageEnum.RA_WSDL_NOT_FOUND, "VnfAdapterNotify.wsdl", "", "getNotifyEP", MsoLogger.ErrorCode.BusinessProcesssError, "Exception - WSDL not found", e);
         }
         if (warWsdlLoc == null) {
-        	LOGGER.error (MessageEnum.RA_WSDL_NOT_FOUND, "VnfAdapterNotify.wsdl", "", "getNotifyEP", MsoLogger.ErrorCode.BusinessProcesssError, "WSDL not found");
+            LOGGER.error (MessageEnum.RA_WSDL_NOT_FOUND, "VnfAdapterNotify.wsdl", "", "getNotifyEP", MsoLogger.ErrorCode.BusinessProcesssError, "WSDL not found");
         } else {
             try {
                 LOGGER.debug ("VnfAdpaterNotify.wsdl location:" + warWsdlLoc.toURI ().toString ());