From: Robert Varga Date: Tue, 8 Feb 2022 09:20:23 +0000 (+0100) Subject: Use JsonParser.parseString() X-Git-Tag: v0.14.9~3 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=6a9a276849a50a2b0e21a5b5b72a9b4b37c3a7cc;p=aaa.git Use JsonParser.parseString() Instantiating JsonParser is deprecate, do not use it. Change-Id: I5486632f3ac00c89941df93096817fca2f820b22 Signed-off-by: Robert Varga --- diff --git a/aaa-shiro/impl/src/main/java/org/opendaylight/aaa/shiro/realm/MoonRealm.java b/aaa-shiro/impl/src/main/java/org/opendaylight/aaa/shiro/realm/MoonRealm.java index e288a96f9..f531354aa 100644 --- a/aaa-shiro/impl/src/main/java/org/opendaylight/aaa/shiro/realm/MoonRealm.java +++ b/aaa-shiro/impl/src/main/java/org/opendaylight/aaa/shiro/realm/MoonRealm.java @@ -111,7 +111,7 @@ public class MoonRealm extends AuthorizingRealm { final String output = webTarget.request(MediaType.APPLICATION_JSON) .post(Entity.entity(input, MediaType.APPLICATION_JSON), String.class); - final JsonElement element = new JsonParser().parse(output); + final JsonElement element = JsonParser.parseString(output); if (!element.isJsonObject()) { throw new IllegalStateException("Authentication error: returned output is not a JSON object"); }