From 118747c66bbca12bca1a79ecdcdbd303fe2df74c Mon Sep 17 00:00:00 2001 From: rtm516 Date: Thu, 30 Jul 2020 17:40:53 +0100 Subject: [PATCH] Move MEGABYTE to a constant (#1059) --- .../src/main/java/org/geysermc/connector/dump/DumpInfo.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/connector/src/main/java/org/geysermc/connector/dump/DumpInfo.java b/connector/src/main/java/org/geysermc/connector/dump/DumpInfo.java index ab7224fd5..19652fdff 100644 --- a/connector/src/main/java/org/geysermc/connector/dump/DumpInfo.java +++ b/connector/src/main/java/org/geysermc/connector/dump/DumpInfo.java @@ -26,6 +26,7 @@ package org.geysermc.connector.dump; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.github.steveice10.mc.protocol.MinecraftConstants; import it.unimi.dsi.fastutil.objects.Object2IntMap; import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap; @@ -47,6 +48,9 @@ import java.util.Properties; @Getter public class DumpInfo { + @JsonIgnore + private static final long MEGABYTE = 1024L * 1024L; + private final DumpInfo.VersionInfo versionInfo; private Properties gitInfo; private final GeyserConfiguration config; @@ -148,8 +152,6 @@ public class DumpInfo { private final long max; RamInfo() { - final long MEGABYTE = 1024L * 1024L; - this.free = Runtime.getRuntime().freeMemory() / MEGABYTE; this.total = Runtime.getRuntime().totalMemory() / MEGABYTE; this.max = Runtime.getRuntime().maxMemory() / MEGABYTE;