NIFI-9576: Allowed Stateless' BlockListClassLoader to load java11 jars/classes (#5726)

This commit is contained in:
Peter Turcsanyi 2022-01-28 19:37:33 +01:00 committed by GitHub
parent 6fca4eb3ce
commit ed5e90fb81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -199,6 +199,15 @@ public class StatelessBootstrap {
filesAllowed.add(file.getName());
}
final File java11Directory = new File(narDirectory, "java11");
final File[] java11DirectoryFiles = java11Directory.listFiles();
if (java11DirectoryFiles != null) {
for (final File file : java11DirectoryFiles) {
findClassNamesInJar(file, classesAllowed);
filesAllowed.add(file.getName());
}
}
classesBlocked.removeAll(classesAllowed);
filesBlocked.removeAll(filesAllowed);