From f7f97af2bfccf754d5bde910ea18458669129241 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Wed, 6 Jan 2021 12:17:00 +0100 Subject: [PATCH] Remove getMXBean --- .../reflect/compiler/BackgroundCompiler.java | 26 ------------------- 1 file changed, 26 deletions(-) diff --git a/src/main/java/com/comphenix/protocol/reflect/compiler/BackgroundCompiler.java b/src/main/java/com/comphenix/protocol/reflect/compiler/BackgroundCompiler.java index f1be8aed..fa7a3cda 100644 --- a/src/main/java/com/comphenix/protocol/reflect/compiler/BackgroundCompiler.java +++ b/src/main/java/com/comphenix/protocol/reflect/compiler/BackgroundCompiler.java @@ -287,32 +287,6 @@ public class BackgroundCompiler { } } - /** - * Retrieve the current usage of the Perm Gen space in percentage. - * @return Usage of the perm gen space. - */ - private double getPermGenUsage() { - Object permGenBean = this.permGenBean; - if (permGenBean == unknownPermGenBean) { - for (MemoryPoolMXBean item : ManagementFactory.getMemoryPoolMXBeans()) { - if (item.getName().contains("Perm Gen")) { - permGenBean = this.permGenBean = item; - break; - } - } - if (permGenBean == unknownPermGenBean) { - permGenBean = this.permGenBean = null; - } - } - if (permGenBean != null) { - MemoryUsage usage = ((MemoryPoolMXBean) permGenBean).getUsage(); - return usage.getUsed() / (double) usage.getCommitted(); - } - - // Unknown - return 0; - } - /** * Clean up after ourselves using the default timeout. */