aboutsummaryrefslogtreecommitdiff
path: root/spark-common/src/main/java/me
diff options
context:
space:
mode:
authorLuck <git@lucko.me>2023-02-12 13:02:08 +0000
committerLuck <git@lucko.me>2023-02-12 13:02:08 +0000
commit6ed41df89e109ef1bb8eef655e5d07843aca22e0 (patch)
tree9e1e3797a7ce20e745c9dc00d3680396a5089d0e /spark-common/src/main/java/me
parent0177865737da4067927851ef5b76407388b7e869 (diff)
downloadspark-6ed41df89e109ef1bb8eef655e5d07843aca22e0.tar.gz
spark-6ed41df89e109ef1bb8eef655e5d07843aca22e0.tar.bz2
spark-6ed41df89e109ef1bb8eef655e5d07843aca22e0.zip
Fix NPE in ClassFinder (#287)
Diffstat (limited to 'spark-common/src/main/java/me')
-rw-r--r--spark-common/src/main/java/me/lucko/spark/common/util/ClassFinder.java3
1 files changed, 3 insertions, 0 deletions
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()) {