updated gson 2.8.5 -> 2.8.6

This commit is contained in:
Sxtanna 2020-07-26 17:32:28 -04:00
parent b464590491
commit c3e0c1fb64
2 changed files with 2 additions and 4 deletions

View File

@ -18,7 +18,7 @@ repositories {
} }
dependencies { 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 'org.bstats:bstats-bukkit:1.5'
implementation 'me.rayzr522:jsonmessage:1.2.1' implementation 'me.rayzr522:jsonmessage:1.2.1'

View File

@ -36,8 +36,6 @@ public final class CommandDump extends PlaceholderCommand
@NotNull @NotNull
private static final String URL = "https://paste.helpch.at/"; private static final String URL = "https://paste.helpch.at/";
@NotNull
private static final JsonParser JSON_PARSER = new JsonParser();
@NotNull @NotNull
private static final DateTimeFormatter DATE_FORMAT = DateTimeFormatter.ofLocalizedDateTime(FormatStyle.LONG) private static final DateTimeFormatter DATE_FORMAT = DateTimeFormatter.ofLocalizedDateTime(FormatStyle.LONG)
.withLocale(Locale.US) .withLocale(Locale.US)
@ -89,7 +87,7 @@ public final class CommandDump extends PlaceholderCommand
{ {
//noinspection UnstableApiUsage //noinspection UnstableApiUsage
final String json = CharStreams.toString(new InputStreamReader(stream, StandardCharsets.UTF_8)); 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) catch (final IOException ex)