diff options
author | Vijay Venkatesh Kumar <vv770d@att.com> | 2018-12-10 18:56:30 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-12-10 18:56:30 +0000 |
commit | 713bb43a00682ebaeb1ada4eb27af965a8d7d56d (patch) | |
tree | 88aa3fcde3068e10105eecd2d048d99b103205b2 /src/main | |
parent | 1afc93ddb4afc226562043822f6c5e9dc0ed4b2a (diff) | |
parent | 314f38cc8aa86d65a664b4f357e3fdea8eede96a (diff) |
Merge "Fix critical issues in dcaegen2-collectors-ves"
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/onap/dcae/commonFunction/ConfigProcessors.java | 6 | ||||
-rw-r--r-- | src/main/java/org/onap/dcae/commonFunction/event/publishing/DMaaPPublishersCache.java | 1 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/org/onap/dcae/commonFunction/ConfigProcessors.java b/src/main/java/org/onap/dcae/commonFunction/ConfigProcessors.java index a9d6b981..09ceeac7 100644 --- a/src/main/java/org/onap/dcae/commonFunction/ConfigProcessors.java +++ b/src/main/java/org/onap/dcae/commonFunction/ConfigProcessors.java @@ -166,7 +166,7 @@ public class ConfigProcessors { if (filter == null || isFilterMet(filter)) { final JSONObject oldValue = (JSONObject) getEventObjectVal(oldField); - if (!oldValue.equals(OBJECT_NOT_FOUND)) { + if (!oldValue.toString().equals(OBJECT_NOT_FOUND)) { setEventObjectVal(field, oldValue); removeEventKey(oldField); } @@ -293,7 +293,7 @@ public class ConfigProcessors { JSONObject tempJObj = null; String tempName = ""; String tempValue = ""; - if (!arrayValue.equals(OBJECT_NOT_FOUND)) { + if (!arrayValue.toString().equals(OBJECT_NOT_FOUND)) { log.info("old value ==" + arrayValue.toString()); // Loop thru the JSONArray, get the name:value pair and write to new JSONObject as hashmap elements for (int i = 0; i < arrayValue.length(); i++) { @@ -301,7 +301,7 @@ public class ConfigProcessors { tempJObj = arrayValue.getJSONObject(i); if (tempJObj != null) { tempName = tempJObj.get("name").toString(); - tempValue = tempJObj.get("value").toString(); + tempValue = tempJObj.get(VALUE).toString(); newHashMap.put(tempName, tempValue); } } diff --git a/src/main/java/org/onap/dcae/commonFunction/event/publishing/DMaaPPublishersCache.java b/src/main/java/org/onap/dcae/commonFunction/event/publishing/DMaaPPublishersCache.java index 4cdf92da..c66cee05 100644 --- a/src/main/java/org/onap/dcae/commonFunction/event/publishing/DMaaPPublishersCache.java +++ b/src/main/java/org/onap/dcae/commonFunction/event/publishing/DMaaPPublishersCache.java @@ -99,6 +99,7 @@ class DMaaPPublishersCache { } } catch (InterruptedException | IOException e) { log.error("Could not close Cambria publisher, some messages might have been dropped", e); + Thread.currentThread().interrupt(); } } } |