diff options
author | Vijay <vv770d@att.com> | 2017-09-25 20:32:23 +0000 |
---|---|---|
committer | Vijay <vv770d@att.com> | 2017-09-25 20:32:48 +0000 |
commit | f46b942de6b6ae6e9ede19a31c43c3e081fdc4e5 (patch) | |
tree | ebc638bdec91f7c78b3db36e573c28ef14d4c668 /src/main/java/org/onap/dcae/commonFunction/ConfigProcessors.java | |
parent | 86ac6e10c0caa05a9649d53b7179b3dcd8fbd802 (diff) |
fix merge error n sonar items
https://jenkins.onap.org/job/dcaegen2-collectors-ves-master-merge-java/33/console
Change-Id: I90693665dcf650028186a47ed69eaf15bc2f0d15
Issue-ID:DCAEGEN2-82
Signed-off-by: Vijay <vv770d@att.com>
Diffstat (limited to 'src/main/java/org/onap/dcae/commonFunction/ConfigProcessors.java')
-rw-r--r-- | src/main/java/org/onap/dcae/commonFunction/ConfigProcessors.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/org/onap/dcae/commonFunction/ConfigProcessors.java b/src/main/java/org/onap/dcae/commonFunction/ConfigProcessors.java index 351d8ade..9a056226 100644 --- a/src/main/java/org/onap/dcae/commonFunction/ConfigProcessors.java +++ b/src/main/java/org/onap/dcae/commonFunction/ConfigProcessors.java @@ -21,6 +21,7 @@ package org.onap.dcae.commonFunction; + import java.text.DecimalFormat; import org.json.JSONArray; import org.json.JSONObject; @@ -334,7 +335,7 @@ public class ConfigProcessors { } } else //if new array - setEventObjectVal(field + "[0]", new JSONObject(value)); + setEventObjectVal(field + "[0]", new JSONObject(value), "JArray"); } else //oldfield is jsonArray setEventObjectVal(field, new JSONArray(value)); @@ -657,8 +658,11 @@ public class ConfigProcessors { } else if (fieldType.equals("integer") && value instanceof String) ((JSONObject)keySeriesObj).put(keySet[keySet.length -1], Integer.valueOf((String) value)); + else if (fieldType.equals("JArray")) + ((JSONArray)keySeriesObj).put( value); else ((JSONObject)keySeriesObj).put(keySet[keySet.length -1], value); + } private JSONObject event = new JSONObject(); } |