From 4d6e8368906345a06ad729135ead45c38b28ab48 Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Sun, 26 May 2019 18:14:54 -0400 Subject: [PATCH] Fix Checkstyle --- proxy/src/main/java/com/velocitypowered/proxy/Metrics.java | 2 +- .../velocitypowered/proxy/config/VelocityConfiguration.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/proxy/src/main/java/com/velocitypowered/proxy/Metrics.java b/proxy/src/main/java/com/velocitypowered/proxy/Metrics.java index b5de66eec..6f2dfa535 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/Metrics.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/Metrics.java @@ -524,7 +524,6 @@ public class Metrics { @Override protected JsonObject getChartData() throws Exception { - JsonObject data = new JsonObject(); JsonObject values = new JsonObject(); Map map = callable.call(); if (map == null || map.isEmpty()) { @@ -547,6 +546,7 @@ public class Metrics { // Null = skip the chart return null; } + JsonObject data = new JsonObject(); data.add("values", values); return data; } diff --git a/proxy/src/main/java/com/velocitypowered/proxy/config/VelocityConfiguration.java b/proxy/src/main/java/com/velocitypowered/proxy/config/VelocityConfiguration.java index 0bf9a799b..f64b30560 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/config/VelocityConfiguration.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/config/VelocityConfiguration.java @@ -731,11 +731,11 @@ public class VelocityConfiguration extends AnnotatedConfig implements ProxyConfi @Ignore private boolean fromConfig; - public Metrics() { + private Metrics() { this.fromConfig = false; } - public Metrics(Toml toml) { + private Metrics(Toml toml) { if (toml != null) { this.enabled = toml.getBoolean("enabled", false); this.id = toml.getString("id", UUID.randomUUID().toString());