Fix NPE from null path in AbstractFileWatcher (#2759)

This commit is contained in:
Luck 2020-12-09 18:21:54 +00:00
parent 17f67f6e13
commit 45188c6334
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B

View File

@ -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;
}