mirror of https://github.com/apache/nifi.git
NIFI-8212: When instantiating a temp component, ensure that nar class loader is set as the context class loader
This closes #4877 Signed-off-by: David Handermann <exceptionfactory@apache.org>
This commit is contained in:
parent
79121a142e
commit
f09f2a6c85
|
@ -540,8 +540,8 @@ public class StandardExtensionDiscoveringManager implements ExtensionDiscovering
|
|||
return null;
|
||||
}
|
||||
|
||||
try {
|
||||
final ClassLoader bundleClassLoader = bundle.getClassLoader();
|
||||
final ClassLoader bundleClassLoader = bundle.getClassLoader();
|
||||
try (final NarCloseable narCloseable = NarCloseable.withComponentNarLoader(bundleClassLoader)) {
|
||||
final Class<?> componentClass = Class.forName(classType, true, bundleClassLoader);
|
||||
final ConfigurableComponent tempComponent = (ConfigurableComponent) componentClass.newInstance();
|
||||
initializeTempComponent(tempComponent);
|
||||
|
|
Loading…
Reference in New Issue