Github user olegz commented on a diff in the pull request:
https://github.com/apache/nifi/pull/1156#discussion_r86220275
--- Diff:
nifi-commons/nifi-utils/src/main/java/org/apache/nifi/util/file/classloader/ClassLoaderUtils.java
---
@@ -52,23 +86,29 @@ public static ClassLoader getCustomClassLoader(String
modulePath, ClassLoader pa
isUrl = false;
}
if (!isUrl) {
- File modulePath = new File(modulePathString);
+ try {
+ File modulePath = new File(modulePathString);
- if (modulePath.exists()) {
+ if (modulePath.exists()) {
-
additionalClasspath.add(modulePath.toURI().toURL());
+
additionalClasspath.add(modulePath.toURI().toURL());
- if (modulePath.isDirectory()) {
- File[] files =
modulePath.listFiles(filenameFilter);
+ if (modulePath.isDirectory()) {
+ File[] files =
modulePath.listFiles(filenameFilter);
- if (files != null) {
- for (File jarFile : files) {
-
additionalClasspath.add(jarFile.toURI().toURL());
+ if (files != null) {
+ for (File jarFile : files) {
+
additionalClasspath.add(jarFile.toURI().toURL());
--- End diff --
That's fine and is generally expected for classpath entries. However, I
would consider NOT adding it to the ```additionalClasspath``` while logging a
warning stating that recursive classpath hierarchies are not supported
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---