mirror of
https://github.com/danieldemus/openhab-core.git
synced 2026-07-29 12:34:22 +02:00
Fix NPE on WatchQueueReader (#2563)
Signed-off-by: Jimmy Tanagra <jimmy@tanagra.id.au>
This commit is contained in:
+5
-2
@@ -337,8 +337,11 @@ public class WatchQueueReader implements Runnable {
|
||||
Path baseWatchedDir = null;
|
||||
Path registeredPath = null;
|
||||
synchronized (this) {
|
||||
baseWatchedDir = keyToService.get(key).getSourcePath();
|
||||
registeredPath = registeredKeys.get(key);
|
||||
AbstractWatchService service = keyToService.get(key);
|
||||
if (service != null) {
|
||||
baseWatchedDir = service.getSourcePath();
|
||||
registeredPath = registeredKeys.get(key);
|
||||
}
|
||||
}
|
||||
if (registeredPath != null) {
|
||||
// If the path has been registered in the watch service it relative path can be resolved
|
||||
|
||||
Reference in New Issue
Block a user