From c3e0c1fb64564663155a7d92a495fbb0b1d22b08 Mon Sep 17 00:00:00 2001 From: Sxtanna Date: Sun, 26 Jul 2020 17:32:28 -0400 Subject: [PATCH] updated gson 2.8.5 -> 2.8.6 --- build.gradle | 2 +- .../clip/placeholderapi/commands/impl/local/CommandDump.java | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) 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)