aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuck <git@lucko.me>2021-12-28 20:06:02 +0000
committerLuck <git@lucko.me>2021-12-28 20:06:02 +0000
commit92669a73490e526459457f4dbd5fff116a628870 (patch)
tree9e2e723f26809d86c2ac3c358648cf8fc035d70e
parentbfbbcb3e68e019da4657ef0da22b889de656ae3f (diff)
downloadspark-92669a73490e526459457f4dbd5fff116a628870.tar.gz
spark-92669a73490e526459457f4dbd5fff116a628870.tar.bz2
spark-92669a73490e526459457f4dbd5fff116a628870.zip
Fix java vendor system property lookup NPE (#152)
-rw-r--r--spark-common/src/main/java/me/lucko/spark/common/platform/PlatformStatisticsProvider.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/spark-common/src/main/java/me/lucko/spark/common/platform/PlatformStatisticsProvider.java b/spark-common/src/main/java/me/lucko/spark/common/platform/PlatformStatisticsProvider.java
index 5608fcc..a9d83b2 100644
--- a/spark-common/src/main/java/me/lucko/spark/common/platform/PlatformStatisticsProvider.java
+++ b/spark-common/src/main/java/me/lucko/spark/common/platform/PlatformStatisticsProvider.java
@@ -82,9 +82,9 @@ public class PlatformStatisticsProvider {
.build()
)
.setJava(SystemStatistics.Java.newBuilder()
- .setVendor(System.getProperty("java.vendor"))
- .setVersion(System.getProperty("java.version"))
- .setVendorVersion(System.getProperty("java.vendor.version"))
+ .setVendor(System.getProperty("java.vendor", "unknown"))
+ .setVersion(System.getProperty("java.version", "unknown"))
+ .setVendorVersion(System.getProperty("java.vendor.version", "unknown"))
.build()
);