From 6ed41df89e109ef1bb8eef655e5d07843aca22e0 Mon Sep 17 00:00:00 2001 From: Luck Date: Sun, 12 Feb 2023 13:02:08 +0000 Subject: Fix NPE in ClassFinder (#287) --- spark-common/src/main/java/me/lucko/spark/common/util/ClassFinder.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'spark-common/src/main') diff --git a/spark-common/src/main/java/me/lucko/spark/common/util/ClassFinder.java b/spark-common/src/main/java/me/lucko/spark/common/util/ClassFinder.java index 4481786..f132613 100644 --- a/spark-common/src/main/java/me/lucko/spark/common/util/ClassFinder.java +++ b/spark-common/src/main/java/me/lucko/spark/common/util/ClassFinder.java @@ -44,6 +44,9 @@ public class ClassFinder { } catch (Exception e) { return; } + if (instrumentation == null) { + return; + } // obtain and cache loaded classes for (Class loadedClass : instrumentation.getAllLoadedClasses()) { -- cgit