Skip to content
Snippets Groups Projects
Commit e5cff9cc authored by Tomasz Grabiec's avatar Tomasz Grabiec
Browse files

java: fix possible NPE in expandClassPath()

File.listFiles() may return null. Spotted by IntelliJ.
parent 2f0c9395
No related branches found
No related tags found
No related merge requests found
......@@ -241,7 +241,11 @@ public class ContextIsolator {
File dir = new File(
component.substring(0, component.length() - 2));
if (dir.isDirectory()) {
for (File file : dir.listFiles()) {
File[] files = dir.listFiles();
if (files == null) {
continue;
}
for (File file : files) {
String filename = file.getPath();
if (filename.endsWith(".jar")) {
ret.add(filename);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment