Merge "Added STD sim 2.0.0 tests"
[nonrtric.git] / policy-agent / src / main / java / org / oransc / policyagent / clients / SdncJsonHelper.java
index d65caf1..ab0d3fa 100644 (file)
@@ -59,7 +59,8 @@ class SdncJsonHelper {
             if (!inputString.isEmpty()) {
                 JSONArray jsonArray = new JSONArray(inputString);
                 for (int i = 0; i < jsonArray.length(); i++) {
-                    arrayList.add(jsonArray.getString(i));
+                    Object value = jsonArray.get(i);
+                    arrayList.add(value.toString());
                 }
             }
             return Flux.fromIterable(arrayList);
@@ -69,19 +70,6 @@ class SdncJsonHelper {
         }
     }
 
-    public static Mono<String> getCreateSchema(String policyTypeResponse, String policyTypeId) {
-        try {
-            JSONObject obj = new JSONObject(policyTypeResponse);
-            JSONObject schemaObj = obj.getJSONObject("create_schema");
-            schemaObj.put("title", policyTypeId);
-            return Mono.just(schemaObj.toString());
-        } catch (Exception e) {
-            String exceptionString = e.toString();
-            logger.error("Unexpected response for policy type: {}, exception: {}", policyTypeResponse, exceptionString);
-            return Mono.error(e);
-        }
-    }
-
     public static <T> String createInputJsonString(T params) {
         JsonElement paramsJson = gson.toJsonTree(params);
         JsonObject jsonObj = new JsonObject();