From b28b4e8c1f90e107c0f909c116a197602301bd65 Mon Sep 17 00:00:00 2001 From: "Lukas Rieger (Blue)" Date: Wed, 1 Jun 2022 12:59:18 +0200 Subject: [PATCH] Use default exception handler again --- .../java/de/bluecolored/bluemap/core/BlueMap.java | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/BlueMap.java b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/BlueMap.java index cc674e9d..efe18888 100644 --- a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/BlueMap.java +++ b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/BlueMap.java @@ -63,17 +63,12 @@ public class BlueMap { Runtime.getRuntime().availableProcessors(), pool -> { ForkJoinWorkerThread thread = ForkJoinPool.defaultForkJoinWorkerThreadFactory.newThread(pool); - thread.setContextClassLoader(BlueMap.class.getClassLoader()); // use plugin-intended classloader - thread.setName("BlueMap-FJ-" + thread.getPoolIndex()); + // use current classloader, this fixes ClassLoading issues with forge + thread.setContextClassLoader(BlueMap.class.getClassLoader()); + thread.setName("BlueMap-FJP-" + thread.getPoolIndex()); return thread; }, - (thread, ex) -> { - if (ex instanceof ClassNotFoundException && ex.getMessage().contains("RemovalCause")) { - Logger.global.noFloodWarning("RemovalCauseError", ex.getMessage()); - } else { - Logger.global.logError("Something went wrong!", ex); - } - }, + null, false );