aboutsummaryrefslogtreecommitdiff
path: root/spark-common/src/main/java/me/lucko
diff options
context:
space:
mode:
authorLuck <git@lucko.me>2022-11-16 21:26:05 +0000
committerLuck <git@lucko.me>2022-11-16 21:26:05 +0000
commit59e6a9814a357162409b096300dd69f7db58f8bf (patch)
tree74ff3aab5251d72349f5a9158a90d77b9c8b0410 /spark-common/src/main/java/me/lucko
parentea4d78c0f2600e7593175ba7f3d35493e6c84869 (diff)
downloadspark-59e6a9814a357162409b096300dd69f7db58f8bf.tar.gz
spark-59e6a9814a357162409b096300dd69f7db58f8bf.tar.bz2
spark-59e6a9814a357162409b096300dd69f7db58f8bf.zip
Fix NPE from server config provider call (#268)
Diffstat (limited to 'spark-common/src/main/java/me/lucko')
-rw-r--r--spark-common/src/main/java/me/lucko/spark/common/sampler/AbstractSampler.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/spark-common/src/main/java/me/lucko/spark/common/sampler/AbstractSampler.java b/spark-common/src/main/java/me/lucko/spark/common/sampler/AbstractSampler.java
index feefd66..59e873c 100644
--- a/spark-common/src/main/java/me/lucko/spark/common/sampler/AbstractSampler.java
+++ b/spark-common/src/main/java/me/lucko/spark/common/sampler/AbstractSampler.java
@@ -157,7 +157,9 @@ public abstract class AbstractSampler implements Sampler {
try {
ServerConfigProvider serverConfigProvider = platform.getPlugin().createServerConfigProvider();
- metadata.putAllServerConfigurations(serverConfigProvider.export());
+ if (serverConfigProvider != null) {
+ metadata.putAllServerConfigurations(serverConfigProvider.export());
+ }
} catch (Exception e) {
e.printStackTrace();
}