From 85d9c87464e31d64613f85dad3d10a905b379416 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Fri, 2 Apr 2021 20:13:57 +0200 Subject: [PATCH] Add RamUsage to be safe --- BauSystem_Main/src/de/steamwar/bausystem/RamUsage.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/RamUsage.java b/BauSystem_Main/src/de/steamwar/bausystem/RamUsage.java index aa98045..9157cbf 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/RamUsage.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/RamUsage.java @@ -23,6 +23,10 @@ import java.lang.management.ManagementFactory; public class RamUsage { + private RamUsage() { + throw new IllegalStateException("Utility Class") + } + public static double getUsage() { try { long memorySize = ((com.sun.management.OperatingSystemMXBean) ManagementFactory.getOperatingSystemMXBean()).getTotalPhysicalMemorySize();