From 5eb0e49534114edf8a76fef5b2a8e50c7bdaa812 Mon Sep 17 00:00:00 2001 From: Fiete Ostkamp Date: Thu, 10 Nov 2022 09:21:49 +0000 Subject: Replace deprecated methods in aai-common Issue-ID: AAI-3589 Signed-off-by: Fiete Ostkamp Change-Id: I9e32b879ee0d143a6b66e06d425bed7412139e58 --- .../src/test/java/org/onap/aai/restclient/MockRestClient.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'aai-schema-ingest') diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/restclient/MockRestClient.java b/aai-schema-ingest/src/test/java/org/onap/aai/restclient/MockRestClient.java index 74d254b1..57988f0b 100644 --- a/aai-schema-ingest/src/test/java/org/onap/aai/restclient/MockRestClient.java +++ b/aai-schema-ingest/src/test/java/org/onap/aai/restclient/MockRestClient.java @@ -179,14 +179,11 @@ public class MockRestClient extends RestClient { public JsonObject getPayload(String filename) throws IOException { InputStream inputStream = getClass().getClassLoader().getResourceAsStream(filename); - // InputStream inputStream = new FileInputStream(filename); - String result = IOUtils.toString(inputStream, StandardCharsets.UTF_8); String message = String.format("Unable to find the %s in src/test/resources", filename); assertNotNull(message, inputStream); - JsonParser parser = new JsonParser(); - JsonObject payload = parser.parse(result).getAsJsonObject(); + JsonObject payload = JsonParser.parseString(result).getAsJsonObject(); return payload; } -- cgit 1.2.3-korg