Remove redundant type cast
[so.git] / bpmn / MSOCoreBPMN / src / main / java / org / openecomp / mso / bpmn / core / json / JsonUtils.java
index b0152a1..bfad9ba 100644 (file)
@@ -327,7 +327,7 @@ public class JsonUtils {
                                        return null;\r
                                } else {\r
                                        if (rawValue instanceof String) {\r
-                                               msoLogger.debug("getJsonValue(): the raw value is a String Object=" + ((String) rawValue));\r
+                                               msoLogger.debug("getJsonValue(): the raw value is a String Object=" + rawValue);\r
                                                return (String) rawValue;\r
                                        } else {\r
                                                msoLogger.debug("getJsonValue(): the raw value is NOT a String Object=" + rawValue.toString());\r
@@ -356,7 +356,7 @@ public class JsonUtils {
                                        return null;\r
                                } else {\r
                                        if (rawValue instanceof String) {\r
-                                               msoLogger.debug("getJsonNodeValue(): the raw value is a String Object=" + ((String) rawValue));\r
+                                               msoLogger.debug("getJsonNodeValue(): the raw value is a String Object=" + rawValue);\r
                                                return (String) rawValue;\r
                                        } else {\r
                                                msoLogger.debug("getJsonNodeValue(): the raw value is NOT a String Object=" + rawValue.toString());\r
@@ -388,7 +388,7 @@ public class JsonUtils {
                                        return 0;\r
                                } else {\r
                                        if (rawValue instanceof Integer) {\r
-                                               msoLogger.debug("getJsonValue(): the raw value is an Integer Object=" + ((String) rawValue));\r
+                                               msoLogger.debug("getJsonValue(): the raw value is an Integer Object=" + rawValue);\r
                                                return (Integer) rawValue;\r
                                        } else {\r
                                                msoLogger.debug("getJsonValue(): the raw value is NOT an Integer Object=" + rawValue.toString());\r
@@ -416,7 +416,7 @@ public class JsonUtils {
                                        return false;\r
                                } else {\r
                                        if (rawValue instanceof Boolean) {\r
-                                               msoLogger.debug("getJsonValue(): the raw value is a Boolean Object=" + ((String) rawValue));\r
+                                               msoLogger.debug("getJsonValue(): the raw value is a Boolean Object=" + rawValue);\r
                                                return (Boolean) rawValue;\r
                                        } else {\r
                                                msoLogger.debug("getJsonValue(): the raw value is NOT an Boolean Object=" + rawValue.toString());\r
@@ -462,7 +462,7 @@ public class JsonUtils {
                                return null;\r
                        } else {\r
                                if (rawValue instanceof JSONArray) {\r
-                                       msoLogger.debug("getJsonParamValue(): keys=" + keys + " points to JSONArray: " + ((JSONArray) rawValue).toString());\r
+                                       msoLogger.debug("getJsonParamValue(): keys=" + keys + " points to JSONArray: " + rawValue.toString());\r
                                        int arrayLen = ((JSONArray) rawValue).length();\r
                                        if (index < 0 || arrayLen < index+1) {\r
                                                msoLogger.debug("getJsonParamValue(): index: " + index + " is out of bounds for array size of " + arrayLen);\r
@@ -549,7 +549,7 @@ public class JsonUtils {
                                msoLogger.debug("getJsonValueForKey(): iterating over the keys");\r
                                Iterator <String> itr = jsonObj.keys();\r
                                while (itr.hasNext()) {\r
-                                       String nextKey = (String) itr.next();\r
+                                       String nextKey = itr.next();\r
                                        Object obj = jsonObj.get(nextKey);\r
                                        if (obj instanceof JSONObject) {\r
                                                msoLogger.debug("getJsonValueForKey(): key=" + nextKey + ", points to JSONObject, recursive call");\r
@@ -592,7 +592,7 @@ public class JsonUtils {
                                msoLogger.debug("getJsonValueForKey(): iterating over the keys");\r
                                Iterator <String> itr = jsonObj.keys();\r
                                while (itr.hasNext()) {\r
-                                       String nextKey = (String) itr.next();\r
+                                       String nextKey = itr.next();\r
                                        Object obj = jsonObj.get(nextKey);\r
                                        if (obj instanceof JSONObject) {\r
                                                msoLogger.debug("getJsonValueForKey(): key=" + nextKey + ", points to JSONObject, recursive call");\r
@@ -634,7 +634,7 @@ public class JsonUtils {
                                msoLogger.debug("getJsonBooleanValueForKey(): iterating over the keys");\r
                                Iterator <String> itr = jsonObj.keys();\r
                                while (itr.hasNext()) {\r
-                                       String nextKey = (String) itr.next();\r
+                                       String nextKey = itr.next();\r
                                        Object obj = jsonObj.get(nextKey);\r
                                        if (obj instanceof JSONObject) {\r
                                                msoLogger.debug("getJsonBooleanValueForKey(): key=" + nextKey + ", points to JSONObject, recursive call");\r
@@ -690,7 +690,7 @@ public class JsonUtils {
                if (!jsonValueExists(jsonStr, keys)) {\r
                        return putJsonValue(jsonStr, keys, value);\r
                } else {\r
-                       msoLogger.debug("addJsonValue(): JSON add failed, key=" + keys + "/value=" + (String) value + " already exists");\r
+                       msoLogger.debug("addJsonValue(): JSON add failed, key=" + keys + "/value=" + value + " already exists");\r
                        return jsonStr;\r
                }\r
        }\r
@@ -826,7 +826,7 @@ public class JsonUtils {
                                                msoLogger.debug("putJsonValue(): key=" + keyStr + " points to json object");\r
                                                jsonObj = (JSONObject) keyValue;\r
                                        } else {\r
-                                               msoLogger.debug("putJsonValue(): key=" + keyStr + " not the last key but points to non-json object: " + (String) keyValue);\r
+                                               msoLogger.debug("putJsonValue(): key=" + keyStr + " not the last key but points to non-json object: " + keyValue);\r
                                                return null;\r
                                        }\r
                                } else { // at the last/new key value\r