diff --git a/build.gradle b/build.gradle index 61506a6..ec2eb6c 100644 --- a/build.gradle +++ b/build.gradle @@ -18,7 +18,7 @@ repositories { } dependencies { - implementation 'com.google.code.gson:gson:2.8.5' + implementation 'com.google.code.gson:gson:2.8.6' implementation 'org.bstats:bstats-bukkit:1.5' implementation 'me.rayzr522:jsonmessage:1.2.1' diff --git a/src/main/java/me/clip/placeholderapi/commands/impl/local/CommandDump.java b/src/main/java/me/clip/placeholderapi/commands/impl/local/CommandDump.java index 54012e1..d66a160 100644 --- a/src/main/java/me/clip/placeholderapi/commands/impl/local/CommandDump.java +++ b/src/main/java/me/clip/placeholderapi/commands/impl/local/CommandDump.java @@ -36,8 +36,6 @@ public final class CommandDump extends PlaceholderCommand @NotNull private static final String URL = "https://paste.helpch.at/"; - @NotNull - private static final JsonParser JSON_PARSER = new JsonParser(); @NotNull private static final DateTimeFormatter DATE_FORMAT = DateTimeFormatter.ofLocalizedDateTime(FormatStyle.LONG) .withLocale(Locale.US) @@ -89,7 +87,7 @@ public final class CommandDump extends PlaceholderCommand { //noinspection UnstableApiUsage final String json = CharStreams.toString(new InputStreamReader(stream, StandardCharsets.UTF_8)); - return JSON_PARSER.parse(json).getAsJsonObject().get("key").getAsString(); + return JsonParser.parseString(json).getAsJsonObject().get("key").getAsString(); } } catch (final IOException ex)