Merge "Remove redundant type cast"
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 ab2c4ef..69e015e 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
@@ -115,7 +115,7 @@
 				} else if ("ack-final-indicator".equals(child.getNodeName())) {
 					ackFinalIndicator = child.getTextContent();
 				} else if ("response-parameters".equals(child.getNodeName())) {
-                    responseParameters.add((Element) child);
+                    responseParameters.add(child);
 				}
 			}
 
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/VfcManager.java b/adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/VfcManager.java
index 2c2143c..6f06fbf 100644
--- a/adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/VfcManager.java
+++ b/adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/VfcManager.java
@@ -398,7 +398,7 @@
 
         String url;
         String originalUrl;
-        originalUrl = (String)nfvoUrlMap.get(step);
+        originalUrl = nfvoUrlMap.get(step);
         url = String.format(originalUrl, variable);
         return url;
 
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/model/RestfulResponse.java b/adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/model/RestfulResponse.java
index 483c952..e4f7f30 100644
--- a/adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/model/RestfulResponse.java
+++ b/adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/model/RestfulResponse.java
@@ -65,7 +65,7 @@
 

     public int getRespHeaderInt(String key) {

         if(this.respHeaderMap != null) {

-            String result = (String)this.respHeaderMap.get(key);

+            String result = this.respHeaderMap.get(key);

             if(result != null) {

                 return Integer.parseInt(result);

             }

@@ -75,7 +75,7 @@
 

     public long getRespHeaderLong(String key) {

         if(this.respHeaderMap != null) {

-            String result = (String)this.respHeaderMap.get(key);

+            String result = this.respHeaderMap.get(key);

             if(result != null) {

                 return Long.parseLong(result);

             }

@@ -85,7 +85,7 @@
 

     public String getRespHeaderStr(String key) {

         if(this.respHeaderMap != null) {

-            return ((String)this.respHeaderMap.get(key));

+            return this.respHeaderMap.get(key);

         }

         return null;

     }

diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowTest.java
index 6f0095f..849aae8 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowTest.java
@@ -133,8 +133,7 @@
 		List<ResponseTransformer> transformerList = new ArrayList<ResponseTransformer>();

 

 		for (Field field : getClass().getFields()) {

-			WorkflowTestTransformer annotation = (WorkflowTestTransformer)

-				field.getAnnotation(WorkflowTestTransformer.class);

+			WorkflowTestTransformer annotation = field.getAnnotation(WorkflowTestTransformer.class);

 

 			if (annotation == null) {

 				continue;

diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonUtils.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonUtils.java
index b0152a1..bfad9ba 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonUtils.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonUtils.java
@@ -327,7 +327,7 @@
 					return null;

 				} else {

 					if (rawValue instanceof String) {

-						msoLogger.debug("getJsonValue(): the raw value is a String Object=" + ((String) rawValue));

+						msoLogger.debug("getJsonValue(): the raw value is a String Object=" + rawValue);

 						return (String) rawValue;

 					} else {

 						msoLogger.debug("getJsonValue(): the raw value is NOT a String Object=" + rawValue.toString());

@@ -356,7 +356,7 @@
 					return null;

 				} else {

 					if (rawValue instanceof String) {

-						msoLogger.debug("getJsonNodeValue(): the raw value is a String Object=" + ((String) rawValue));

+						msoLogger.debug("getJsonNodeValue(): the raw value is a String Object=" + rawValue);

 						return (String) rawValue;

 					} else {

 						msoLogger.debug("getJsonNodeValue(): the raw value is NOT a String Object=" + rawValue.toString());

@@ -388,7 +388,7 @@
 					return 0;

 				} else {

 					if (rawValue instanceof Integer) {

-						msoLogger.debug("getJsonValue(): the raw value is an Integer Object=" + ((String) rawValue));

+						msoLogger.debug("getJsonValue(): the raw value is an Integer Object=" + rawValue);

 						return (Integer) rawValue;

 					} else {

 						msoLogger.debug("getJsonValue(): the raw value is NOT an Integer Object=" + rawValue.toString());

@@ -416,7 +416,7 @@
 					return false;

 				} else {

 					if (rawValue instanceof Boolean) {

-						msoLogger.debug("getJsonValue(): the raw value is a Boolean Object=" + ((String) rawValue));

+						msoLogger.debug("getJsonValue(): the raw value is a Boolean Object=" + rawValue);

 						return (Boolean) rawValue;

 					} else {

 						msoLogger.debug("getJsonValue(): the raw value is NOT an Boolean Object=" + rawValue.toString());

@@ -462,7 +462,7 @@
 				return null;

 			} else {

 				if (rawValue instanceof JSONArray) {

-					msoLogger.debug("getJsonParamValue(): keys=" + keys + " points to JSONArray: " + ((JSONArray) rawValue).toString());

+					msoLogger.debug("getJsonParamValue(): keys=" + keys + " points to JSONArray: " + rawValue.toString());

 					int arrayLen = ((JSONArray) rawValue).length();

 					if (index < 0 || arrayLen < index+1) {

 						msoLogger.debug("getJsonParamValue(): index: " + index + " is out of bounds for array size of " + arrayLen);

@@ -549,7 +549,7 @@
 				msoLogger.debug("getJsonValueForKey(): iterating over the keys");

 				Iterator <String> itr = jsonObj.keys();

 				while (itr.hasNext()) {

-					String nextKey = (String) itr.next();

+					String nextKey = itr.next();

 					Object obj = jsonObj.get(nextKey);

 					if (obj instanceof JSONObject) {

 						msoLogger.debug("getJsonValueForKey(): key=" + nextKey + ", points to JSONObject, recursive call");

@@ -592,7 +592,7 @@
 				msoLogger.debug("getJsonValueForKey(): iterating over the keys");

 				Iterator <String> itr = jsonObj.keys();

 				while (itr.hasNext()) {

-					String nextKey = (String) itr.next();

+					String nextKey = itr.next();

 					Object obj = jsonObj.get(nextKey);

 					if (obj instanceof JSONObject) {

 						msoLogger.debug("getJsonValueForKey(): key=" + nextKey + ", points to JSONObject, recursive call");

@@ -634,7 +634,7 @@
 				msoLogger.debug("getJsonBooleanValueForKey(): iterating over the keys");

 				Iterator <String> itr = jsonObj.keys();

 				while (itr.hasNext()) {

-					String nextKey = (String) itr.next();

+					String nextKey = itr.next();

 					Object obj = jsonObj.get(nextKey);

 					if (obj instanceof JSONObject) {

 						msoLogger.debug("getJsonBooleanValueForKey(): key=" + nextKey + ", points to JSONObject, recursive call");

@@ -690,7 +690,7 @@
 		if (!jsonValueExists(jsonStr, keys)) {

 			return putJsonValue(jsonStr, keys, value);

 		} else {

-			msoLogger.debug("addJsonValue(): JSON add failed, key=" + keys + "/value=" + (String) value + " already exists");

+			msoLogger.debug("addJsonValue(): JSON add failed, key=" + keys + "/value=" + value + " already exists");

 			return jsonStr;

 		}

 	}

@@ -826,7 +826,7 @@
 						msoLogger.debug("putJsonValue(): key=" + keyStr + " points to json object");

 						jsonObj = (JSONObject) keyValue;

 					} else {

-						msoLogger.debug("putJsonValue(): key=" + keyStr + " not the last key but points to non-json object: " + (String) keyValue);

+						msoLogger.debug("putJsonValue(): key=" + keyStr + " not the last key but points to non-json object: " + keyValue);

 						return null;

 					}

 				} else { // at the last/new key value

diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/plugins/LoggingAndURNMappingPlugin.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/plugins/LoggingAndURNMappingPlugin.java
index 730c145..b66169d 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/plugins/LoggingAndURNMappingPlugin.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/plugins/LoggingAndURNMappingPlugin.java
@@ -421,7 +421,7 @@
 				try {
 					String id = execution.getId();
 					if ("START".equals(event) && id != null ) {
-						startTimes.put(id, (Long)System.currentTimeMillis());
+						startTimes.put(id, System.currentTimeMillis());
 					} else if ("END".equals(event) && id != null) {
 						String prefix = (String) execution.getVariable("prefix");
 
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/TestBaseTask.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/TestBaseTask.java
index 2d204c3..d434ac7 100644
--- a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/TestBaseTask.java
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/TestBaseTask.java
@@ -58,8 +58,8 @@
 		Map<String, Object> variables = new HashMap<>();
 		variables.put("firstName", "Jane");
 		variables.put("lastName", "Doe");
-		variables.put("age", (Integer)25);
-		variables.put("lastVisit", (Long)1438270117000L);
+		variables.put("age", 25);
+		variables.put("lastVisit", 1438270117000L);
 
 		RuntimeService runtimeService = processEngineRule.getRuntimeService();
 		assertNotNull(runtimeService);