diff options
author | Luck <git@lucko.me> | 2021-12-28 20:06:02 +0000 |
---|---|---|
committer | Luck <git@lucko.me> | 2021-12-28 20:06:02 +0000 |
commit | 92669a73490e526459457f4dbd5fff116a628870 (patch) | |
tree | 9e2e723f26809d86c2ac3c358648cf8fc035d70e /spark-common/src/main/java | |
parent | bfbbcb3e68e019da4657ef0da22b889de656ae3f (diff) | |
download | spark-92669a73490e526459457f4dbd5fff116a628870.tar.gz spark-92669a73490e526459457f4dbd5fff116a628870.tar.bz2 spark-92669a73490e526459457f4dbd5fff116a628870.zip |
Fix java vendor system property lookup NPE (#152)
Diffstat (limited to 'spark-common/src/main/java')
-rw-r--r-- | spark-common/src/main/java/me/lucko/spark/common/platform/PlatformStatisticsProvider.java | 6 |
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() ); |