Closed gmethvin closed 6 years ago
@gmethvin :+1: No FileSystemException
anymore.
I have one NullPointerException
:
java.lang.NullPointerException: null
at sun.nio.fs.WindowsPath.toWindowsPath(Unknown Source)
at sun.nio.fs.WindowsPath.resolve(Unknown Source)
at sun.nio.fs.WindowsPath.resolve(Unknown Source)
at io.methvin.watcher.DirectoryWatcher.watch(DirectoryWatcher.java:131)
at io.methvin.watcher.DirectoryWatcher.lambda$watchAsync$0(DirectoryWatcher.java:100)
All files were recognized and the other issues are fixed.
The NullPointerException looks similar to https://issues.apache.org/jira/browse/FELIX-5250. Any chance that file is on a mapped network drive?
Actually I updated to do a null check. It could be that it's an OVERFLOW
event. If it's not, I throw an IllegalStateException
there so you can at least figure out what's going on.
@gmethvin I had the exception only once and the file was not from a network drive. I'm not sure what was the cause.
Okay. Well, it seems like something that can happen on Windows under some circumstances, and since we're catching the exception it shouldn't be fatal. As long it's able to detect file changes I think we're ok.
:+1: Great
This modifier is supported on Windows, and allows us to watch the entire file tree recursively.
I've also set up AppVeyor to do builds on Windows: https://ci.appveyor.com/project/gmethvin/directory-watcher/branch/file-tree