From 7eb59b4857dcdfb4556ed697b8fd6d7ec1722064 Mon Sep 17 00:00:00 2001 From: david-leifker <114954101+david-leifker@users.noreply.github.com> Date: Thu, 4 Apr 2024 15:24:17 -0500 Subject: [PATCH] bump(version): bump classgraph version, add early package filter (#10207) --- 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 a78d308c617c0b..dbbe6118eeaeeb 100644 --- a/build.gradle +++ b/build.gradle @@ -266,7 +266,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()