aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 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();
}