diff options
author | Luck <git@lucko.me> | 2022-10-02 20:16:03 +0100 |
---|---|---|
committer | Luck <git@lucko.me> | 2022-10-02 20:16:03 +0100 |
commit | c4b1eccd9cd51e348983fab42ced78166f39cb0e (patch) | |
tree | 9c40474c268aafa51341c1fe82c0d0dcc88d456b /spark-common/src | |
parent | dbdd3eb1344b837abb13538b9c55d1d99e697e54 (diff) | |
download | spark-c4b1eccd9cd51e348983fab42ced78166f39cb0e.tar.gz spark-c4b1eccd9cd51e348983fab42ced78166f39cb0e.tar.bz2 spark-c4b1eccd9cd51e348983fab42ced78166f39cb0e.zip |
Fix NPE caused by extraMetadataProvider being null
Diffstat (limited to 'spark-common/src')
-rw-r--r-- | spark-common/src/main/java/me/lucko/spark/common/sampler/AbstractSampler.java | 4 |
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 e20a2a8..6fc5a10 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 @@ -156,7 +156,9 @@ public abstract class AbstractSampler implements Sampler { try { MetadataProvider extraMetadataProvider = platform.getPlugin().createExtraMetadataProvider(); - metadata.putAllExtraPlatformMetadata(extraMetadataProvider.export()); + if (extraMetadataProvider != null) { + metadata.putAllExtraPlatformMetadata(extraMetadataProvider.export()); + } } catch (Exception e) { e.printStackTrace(); } |