Merge "fixed sonar issue in ArchiveInfraRequestsScheduler"
diff --git a/adapters/mso-openstack-adapters/src/main/java/db/migration/V4_2__DummyMigration.java b/adapters/mso-openstack-adapters/src/main/java/db/migration/V4_2__DummyMigration.java
index 6530b7b..6398d41 100644
--- a/adapters/mso-openstack-adapters/src/main/java/db/migration/V4_2__DummyMigration.java
+++ b/adapters/mso-openstack-adapters/src/main/java/db/migration/V4_2__DummyMigration.java
@@ -7,6 +7,6 @@
 public class V4_2__DummyMigration implements JdbcMigration {
     @Override
     public void migrate(Connection connection) throws Exception {
-        
+        //does nothing
     }
 }
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java
index e5a8d3f..c8df1fd 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java
@@ -5,6 +5,8 @@
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
  * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
  * ================================================================================
+ * Modifications Copyright (C) 2018 IBM.
+ * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -465,7 +467,8 @@
                         Map <String, Object> outputs = heatStack.getOutputs ();
                         Map <String, String> sMap = new HashMap <> ();
                         if (outputs != null) {
-                        	for (String key : outputs.keySet ()) {
+                        	for (Map.Entry<String, Object> entry : outputs.entrySet()) {
+                        		String key=entry.getKey();
                         		if (key != null && key.startsWith ("subnet")) {
                         			if (aic3template) //one subnet_id output
                         			{
@@ -619,7 +622,8 @@
                 Map <String, Object> outputs = heatStack.getOutputs ();
                 Map <String, String> sMap = new HashMap <> ();
                 if (outputs != null) {
-                    for (String key : outputs.keySet ()) {
+                    for (Map.Entry<String, Object> entry : outputs.entrySet()) {
+                    	String key = entry.getKey();
                         if (key != null && key.startsWith ("subnet")) {
                         	if (aic3template) //one subnet output expected
                 			{
@@ -1067,7 +1071,8 @@
                 Map<String, Object> outputs = heatStack.getOutputs();
                 Map<String, String> sMap = new HashMap<>();
                 if (outputs != null) {
-                    for (String key : outputs.keySet()) {
+                    for (Map.Entry<String, Object> entry : outputs.entrySet()) {
+                    	String key=entry.getKey();
                         if (key != null && key.startsWith("subnet")) {
                             if (aic3template) //one subnet output expected
                             {
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/MapRequestTunables.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/MapRequestTunables.java
index b456fb2..a5800fc 100644
--- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/MapRequestTunables.java
+++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/MapRequestTunables.java
@@ -4,6 +4,8 @@
  * ================================================================================
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
+ * Modifications Copyright (C) 2018 IBM.
+ * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -87,7 +89,7 @@
 				}
 			}
 
-			if (reqTunable.getSdncUrl() == null || reqTunable.getSdncUrl().equals("")) {
+			if (reqTunable.getSdncUrl() == null || ("").equals(reqTunable.getSdncUrl())) {
 				error = "Invalid configuration, sdncUrl required for:" + key + " value:" + value;
 			}
 		} else {
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCServiceRequestConnector.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCServiceRequestConnector.java
index 2fd39df..8ca1450 100644
--- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCServiceRequestConnector.java
+++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCServiceRequestConnector.java
@@ -5,6 +5,8 @@
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
  * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
  * ================================================================================
+ * Modifications Copyright (C) 2018 IBM.
+ * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -149,7 +151,7 @@
 				ackFinalIndicator = "Y";
 			}
 
-			if (!ackFinalIndicator.equals("Y") && !"N".equals(ackFinalIndicator)) {
+			if (!"Y".equals(ackFinalIndicator) && !"N".equals(ackFinalIndicator)) {
 				throw new ParseException("Invalid ack-final-indicator in SDNC response: '" + ackFinalIndicator + "'", 0);
 			}
 
@@ -161,7 +163,7 @@
 
 			// If the response code in the message from SDNC was not 2XX, return SDNCServiceError.
 
-			if (!responseCode.matches("2[0-9][0-9]") && !responseCode.equals("0")) {
+			if (!responseCode.matches("2[0-9][0-9]") && !("0").equals(responseCode)) {
 				// Not a 2XX response.  Return SDNCServiceError.
 				return new SDNCServiceError(svcRequestId, responseCode, responseMessage, ackFinalIndicator);
 			}