mirror of
https://github.com/danieldemus/openhab-core.git
synced 2025-01-10 21:31:53 +01:00
Fix NPE on WatchQueueReader (#2563)
Signed-off-by: Jimmy Tanagra <jimmy@tanagra.id.au>
This commit is contained in:
parent
85b0910ef1
commit
8343703406
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user