aboutsummaryrefslogtreecommitdiff
path: root/spark-common/src
diff options
context:
space:
mode:
authorLuck <git@lucko.me>2021-05-23 16:08:44 +0100
committerLuck <git@lucko.me>2021-05-23 16:08:44 +0100
commit80f97789b874afb499a2942b7c9af7bbdf588200 (patch)
tree359fefb4e61fa76168f7c869155091a2731a01a4 /spark-common/src
parent69c8401d85b66c544b376ea714befc882f1397cd (diff)
downloadspark-80f97789b874afb499a2942b7c9af7bbdf588200.tar.gz
spark-80f97789b874afb499a2942b7c9af7bbdf588200.tar.bz2
spark-80f97789b874afb499a2942b7c9af7bbdf588200.zip
Fix platform enable condition being inverted
Diffstat (limited to 'spark-common/src')
-rw-r--r--spark-common/src/main/java/me/lucko/spark/common/SparkPlatform.java2
1 files changed, 1 insertions, 1 deletions
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!");
}