From f46b942de6b6ae6e9ede19a31c43c3e081fdc4e5 Mon Sep 17 00:00:00 2001 From: Vijay Date: Mon, 25 Sep 2017 20:32:23 +0000 Subject: 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 --- src/main/java/org/onap/dcae/commonFunction/ConfigProcessors.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/main/java/org/onap/dcae/commonFunction/ConfigProcessors.java') 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(); } -- cgit 1.2.3-korg