Fix NPE from null path in AbstractFileWatcher (#2759)

This commit is contained in:
Luck committed 2020-12-09 18:21:54 +00:00
1 parent 17f67f6e13
commit 45188c6334
1 file changed
+1 -1
@@ -145,7 +145,7 @@ public abstract class AbstractFileWatcher implements AutoCloseable {
Path context = event.context();
// ignore contexts with a name count of zero
if (context.getNameCount() == 0) {
if (context == null || context.getNameCount() == 0) {
continue;
}