From 92669a73490e526459457f4dbd5fff116a628870 Mon Sep 17 00:00:00 2001 From: Luck Date: Tue, 28 Dec 2021 20:06:02 +0000 Subject: Fix java vendor system property lookup NPE (#152) --- .../me/lucko/spark/common/platform/PlatformStatisticsProvider.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'spark-common/src/main/java/me') 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() ); -- cgit