diff options
author | Seshu Kumar M <seshu.kumar.m@huawei.com> | 2018-03-13 05:28:40 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-03-13 05:28:40 +0000 |
commit | 811023560e2b13a8d30a966b5d00884f8f37f175 (patch) | |
tree | 27f1422f4156d0afc2f934ccc0cabeed422a4577 /bpmn/MSOCoreBPMN/src/main | |
parent | 1eee18cabc9b2729af97f222feb37aa81281d2dc (diff) | |
parent | bde88b29e663fe08325cf3abd72236f96c498cd0 (diff) |
Merge "Remove redundant type cast"
Diffstat (limited to 'bpmn/MSOCoreBPMN/src/main')
2 files changed, 11 insertions, 11 deletions
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 b0152a1296..bfad9bac26 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 @@ public class JsonUtils { 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 @@ public class JsonUtils { 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 @@ public class JsonUtils { 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 @@ public class JsonUtils { 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 @@ public class JsonUtils { 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 @@ public class JsonUtils { 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 @@ public class JsonUtils { 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 @@ public class JsonUtils { 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 @@ public class JsonUtils { 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 @@ public class JsonUtils { 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 730c1451d5..b66169db92 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 @@ public class LoggingAndURNMappingPlugin extends AbstractProcessEnginePlugin { 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"); |