From 5fb3a1aadc7c6a89a5eec8788c522afd5954fa3c Mon Sep 17 00:00:00 2001 From: Altiami Date: Sun, 5 May 2024 09:39:39 -0700 Subject: [PATCH] Undo leftover experimental AtomicBoolean --- .../nitori/compatibility/BasePluginCompatibility.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/gensokyoreimagined/nitori/compatibility/BasePluginCompatibility.java b/src/main/java/net/gensokyoreimagined/nitori/compatibility/BasePluginCompatibility.java index 8966a7f..ab1929a 100644 --- a/src/main/java/net/gensokyoreimagined/nitori/compatibility/BasePluginCompatibility.java +++ b/src/main/java/net/gensokyoreimagined/nitori/compatibility/BasePluginCompatibility.java @@ -40,7 +40,7 @@ public abstract class BasePluginCompatibility { /** * Whether the compatibility class has attempted to resolve the reflection references yet or not. */ - private final AtomicBoolean reflectionResolutionAttempted = new AtomicBoolean(false); + private boolean reflectionResolutionAttempted = false; /** * Define a new compatibility class. @@ -112,7 +112,7 @@ public abstract class BasePluginCompatibility { */ boolean completePluginCompatibilityCondition(BooleanSupplier conditionCallback) { synchronized (this) { // compatibility classes are singletons so syncing on itself is safe - if (!this.reflectionResolutionAttempted.getAcquire()) { + if (!this.reflectionResolutionAttempted) { var pluginClassLoaders = collectPluginClassLoaders(); if (pluginClassLoaders == null) { return false; @@ -125,7 +125,7 @@ public abstract class BasePluginCompatibility { onPluginClassesNotFound(e); return true; } finally { - this.reflectionResolutionAttempted.setRelease(true); + this.reflectionResolutionAttempted = true; } NitoriUtil.getPreferredLogger().info(NitoriUtil.makeLogMessage("Resolved reflection references for " + thisClassName + ".")); }