You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by ro...@apache.org on 2021/05/15 01:26:40 UTC
[felix-dev] branch master updated: FIX: Prevent Null pointer
exception in fileinstall watcher
This is an automated email from the ASF dual-hosted git repository.
rotty3000 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 ffe8394 FIX: Prevent Null pointer exception in fileinstall watcher
ffe8394 is described below
commit ffe8394eb5028868847a98de2cc10a9c8ebc04b7
Author: Markus <{I...@users.noreply.github.com>
AuthorDate: Wed Sep 30 11:37:34 2020 +0200
FIX: Prevent Null pointer exception in fileinstall watcher
An OVERFLOW event might have a context that is null. As a consequence the Path.resolve call will throw a null pointer exception
---
.../main/java/org/apache/felix/fileinstall/internal/Watcher.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/Watcher.java b/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/Watcher.java
index 6ac203b..7dbaa96 100644
--- a/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/Watcher.java
+++ b/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/Watcher.java
@@ -176,7 +176,11 @@ public abstract class Watcher implements Closeable {
// Context for directory entry event is the file name of entry
Path name = ev.context();
- Path child = dir.resolve(name);
+ Path child = null;
+
+ if(name!=null){
+ child = dir.resolve(name);
+ }
debug("Processing event %s on path %s", kind, child);