Use JsonParser.parseString()
[aaa.git] / aaa-shiro / impl / src / main / java / org / opendaylight / aaa / shiro / realm / MoonRealm.java
index e288a96f9d677afc7f77add3093ab7be1db0332c..f531354aad45da9a09800f000e6ae51602cec161 100644 (file)
@@ -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");
         }