From 80f97789b874afb499a2942b7c9af7bbdf588200 Mon Sep 17 00:00:00 2001 From: Luck Date: Sun, 23 May 2021 16:08:44 +0100 Subject: Fix platform enable condition being inverted --- spark-common/src/main/java/me/lucko/spark/common/SparkPlatform.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'spark-common/src/main/java/me/lucko/spark') diff --git a/spark-common/src/main/java/me/lucko/spark/common/SparkPlatform.java b/spark-common/src/main/java/me/lucko/spark/common/SparkPlatform.java index a4ae848..491b7d3 100644 --- a/spark-common/src/main/java/me/lucko/spark/common/SparkPlatform.java +++ b/spark-common/src/main/java/me/lucko/spark/common/SparkPlatform.java @@ -119,7 +119,7 @@ public class SparkPlatform { } public void enable() { - if (this.enabled.compareAndSet(false, true)) { + if (!this.enabled.compareAndSet(false, true)) { throw new RuntimeException("Platform has already been enabled!"); } -- cgit