From 491e237df16a7bbdb3783007c1105e2010a83ec9 Mon Sep 17 00:00:00 2001 From: David Leifker Date: Thu, 4 Apr 2024 12:13:06 -0500 Subject: [PATCH] bump(version): bump classgraph version, add early package filter --- build.gradle | 2 +- .../com/linkedin/metadata/aspect/plugins/PluginFactory.java | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 5cf43755fceffe..833ed50d0ccb78 100644 --- a/build.gradle +++ b/build.gradle @@ -265,7 +265,7 @@ project.ext.externalDependency = [ 'jline':'jline:jline:1.4.1', 'jetbrains':' org.jetbrains.kotlin:kotlin-stdlib:1.6.0', 'annotationApi': 'javax.annotation:javax.annotation-api:1.3.2', - 'classGraph': 'io.github.classgraph:classgraph:4.8.165', + 'classGraph': 'io.github.classgraph:classgraph:4.8.168', ] allprojects { diff --git a/entity-registry/src/main/java/com/linkedin/metadata/aspect/plugins/PluginFactory.java b/entity-registry/src/main/java/com/linkedin/metadata/aspect/plugins/PluginFactory.java index 5f35cb0447e484..66b362542ff7f2 100644 --- a/entity-registry/src/main/java/com/linkedin/metadata/aspect/plugins/PluginFactory.java +++ b/entity-registry/src/main/java/com/linkedin/metadata/aspect/plugins/PluginFactory.java @@ -24,6 +24,7 @@ import javax.annotation.Nullable; import lombok.Getter; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.ArrayUtils; @Slf4j public class PluginFactory { @@ -68,6 +69,7 @@ public PluginFactory( @Nullable PluginConfiguration pluginConfiguration, @Nonnull List classLoaders) { this.classGraph = new ClassGraph() + .acceptPackages(ArrayUtils.addAll(HOOK_PACKAGES, VALIDATOR_PACKAGES)) .enableRemoteJarScanning() .enableExternalClasses() .enableClassInfo()