diff options
author | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2022-11-10 11:03:00 +0000 |
---|---|---|
committer | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2022-11-10 11:03:00 +0000 |
commit | f8c058b2be718ab825f88e10e43ed59d5ca75de2 (patch) | |
tree | 7078532cf899cc9d618345aac2c865e233663e01 /aai-queries/src/main | |
parent | a8e838713d168e7cd81c9765d5e5a56b88e48def (diff) |
Reduce the number of problems in schema-service
Issue-ID: AAI-3590
Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
Change-Id: I7a5d3e5a4db75efb8a8fcc6c8598d6cab80dca4a
Diffstat (limited to 'aai-queries/src/main')
-rw-r--r-- | aai-queries/src/main/java/org/onap/aai/queries/GetCustomQueryConfig.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/aai-queries/src/main/java/org/onap/aai/queries/GetCustomQueryConfig.java b/aai-queries/src/main/java/org/onap/aai/queries/GetCustomQueryConfig.java index 07f7724..f9cebf2 100644 --- a/aai-queries/src/main/java/org/onap/aai/queries/GetCustomQueryConfig.java +++ b/aai-queries/src/main/java/org/onap/aai/queries/GetCustomQueryConfig.java @@ -20,7 +20,11 @@ package org.onap.aai.queries; -import com.google.gson.*; +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; @@ -38,16 +42,12 @@ public class GetCustomQueryConfig { private final static String STORED_QUERIES_CONFIG = "stored-queries"; private final static String STORED_QUERY_CONFIG = "stored-query"; - // public static final String AAI_HOME_ETC_QUERY_JSON = AAIConstants.AAI_HOME_ETC + "query" + - // AAIConstants.AAI_FILESEP + "stored-queries.json"; - public GetCustomQueryConfig(String customQueryJson) { init(customQueryJson); } private void init(String customQueryJson) { - JsonParser parser = new JsonParser(); - JsonObject queriesObject = parser.parse(customQueryJson).getAsJsonObject(); + JsonObject queriesObject = JsonParser.parseString(customQueryJson).getAsJsonObject(); if (queriesObject.has(STORED_QUERIES_CONFIG)) { storedQueries = queriesObject.getAsJsonArray(STORED_QUERIES_CONFIG); |