This is an automated email from the ASF dual-hosted git repository.
jbonofre pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/felix-dev.git
The following commit(s) were added to refs/heads/master by this push:
new cbf8174 [FELIX-6461] Test if files is not null (before empty) to
avoid NPE
new 648306f Merge pull request #106 from jbonofre/FELIX-6461
cbf8174 is described below
commit cbf8174b66af21453ae209c590d4bf7f4a36e36b
Author: Jean-Baptiste Onofré <[email protected]>
AuthorDate: Mon Oct 18 11:34:02 2021 +0200
[FELIX-6461] Test if files is not null (before empty) to avoid NPE
---
.../java/org/apache/felix/fileinstall/internal/DirectoryWatcher.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/DirectoryWatcher.java
b/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/DirectoryWatcher.java
index a25bba8..796f0a1 100644
---
a/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/DirectoryWatcher.java
+++
b/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/DirectoryWatcher.java
@@ -312,7 +312,7 @@ public class DirectoryWatcher extends Thread implements
BundleListener
// Check that there is a result. If not, this means that
the directory can not be listed,
// so it's presumably not a valid directory (it may have
been deleted by someone).
// In such case, just sleep
- if (!files.isEmpty()) {
+ if (files != null && !files.isEmpty()) {
process(files);
}
}